locate all exe file in powershell
#Navigate to the desired directory you want to search
cd C:\
#Then run the command
Get-ChildItem -Filter "*.exe" -Recurse #or
gci -Filter "*.exe" -Recurse #the alias for Get-ChildItem is 'gci'
#-Filter "*.exe" is an argument that specifies to only find filenames which end
#in ".exe". (The * is a type of regular expression notation).
#-Recurse is an argument that specifies to search all child directories.
#This will make your function run on "C:/", but also all child directories of C:/,
#and all child directories of those directories and so on.
#Ommit it if you want to search only that drive.