Been a while since I posted here. I’m trying to do a search for a file. Instead of getting only results from the C: drive I’m trying to include usb and mapped drives as well. So far I’ve only gotten get-childitem -Path C:\ -Filter *$searchedobject*. Problem is I can’t figure out how to include any additional drives. Thoughts?
In the simplest case you can use Get-PSDrive to list all available drives. And to narrow it down to the ones with filesystems on it you can use Get-PSDrive -PSProvider 'FileSystem'.