How Do You Use PowerShell to Search Every Folder for a File by the File’s Name?

Problem scenario:  You want to find a file on your Windows desktop by a specific name.  How do you search every folder to find it?

Use PowerShell.  Run these two commands to find "foobar.txt":

cd /
gci -recurse -filter "foobar.txt"

Leave a comment

Your email address will not be published. Required fields are marked *