Question:
Anyone know a fast way to do a recursive directory listing? I am trying to go through a SAN of about 10tb and “get-childitem -include” takes days to run… I know there will be no way to bring it down to minutes but perhaps some way to cut the time to a few hours would be great. I only need a list i can sort through don’t need the file properties as I will be using this to find certain types of files on our SAN such as PST files.
If anyone could point me in the direction on how to use the compiled code from HERE I should be good too.
Answer:
If it’s just one extension that you’re after use the Filter parameter, it’s much faster than -Include. I’d also suggest to use PowerShell 3 is you can (get-childitem has the new -file switch), as far as I remember listing UNC paths performance was enhanced in it (with underlying .net 4 support).
Another option would be to use the dir command from a cmd window, should be very fast.