list-system-files
Lists all system files in a directory tree
#Requires -Version 5.1
param([string]$path = "$PWD")
try {
$stopWatch = [system.diagnostics.stopwatch]::startNew()
$path = Resolve-Path "$path"
Write-Progress "Scanning $path for system files..."
[int]$count = 0
Get-ChildItem "$path" -attributes System -recurse | Foreach-Object {
"📄$($_.FullName)"
$count++
}
Write-Progress -completed " "
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
"✅ Found $count system files within 📂$path in $($elapsed)s."
exit 0
} catch {
throw
}Specifies the path to the directory tree (default is current working dir)