I am try to create Powershell script to search for a sacrifice file (.exe) on the same machine or another machine in the network and return all the paths of the files with the product version for each one
I used the below code but I only was able to get the path only
$filename = 'example.exe'
(gdr -PSProvider 'FileSystem' | %{ ls -r $_.root} 2>$null | where { $_.name -eq ".EXE" })