Powershell script to search for alternate data streams
This script searches recursively through a specified file system for alternate data streams (ADS).
The script can search local and UNC paths speciffied by the pathparamenter.AllreadablefileswillhavethestreamattrubuteinspectedignoringthedefaultDATAandFAVICON(imagefileonURLfiles)streams.ThescriptuseBoeProx′samazingGet−RunspaceDatafunctionandothercodetomultithreadthesearch.Thedefaultnumberofthreadsisthenumberoflogicalcoresplusone.Thiscanbeadjustedbyspecifiyingthethreads parameter. Use with caution as
runspaces can easily chomp resources (CPU and RAM).
Once the number of file system objects (files and folders) is determined, they are split into equal groups of objects
divided by the number of threads. Then each thread has a subset of the total objects to inspect for ADS.