search for ADS 1

search for ADS

//paste in PowerShell inside the folder that you want to search //
gci -recurse | % { gi $_.FullName -stream * } | where stream -ne ':$Data'

Here is what the above code is Doing:
1. gci -recurse | % { gi $_.FullName -stream * }
– gci -recurse: Get-ChildItem -recurse
– | % { gi $_.FullName -stream * }: pipe the results of the previous command to a ForEach-Object loop that runs Get-Item on each file and returns the streams
2. where stream -ne ‘:$Data’
– where stream -ne ‘:$Data’: filter the results to only show streams that are not named :$Data

Similar Posts