Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

get-childitem, cant exclude directory

$
0
0

i am trying to search the hdd for a .url shortcut, my script is pretty simple, but I am trying to recursively search the drive and exclude the windows folder. I have tried exclude, I have tried piping it to a object and using where -nomatch. but every single time it keeps looking in the windows folder.

get-childitem -Path C:\*\"CDS.url" -r -Exclude "Windows"

thank you.




Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>