- 1 year ago
Find specific .exe files on a computer with PowerShell
To find specific .exe files on a computer using PowerShell, you can use the Get-ChildItem
cmdlet along with the -Filter
parameter to filter the results to only include files with the .exe extension. Here's the PowerShell command to achieve this:
powershellGet-ChildItem -Path "C:\Path\To\Search" -Filter "*.exe" -Recurse
Replace "C:\Path\To\Search"
with the directory where you want to start the search. The -Recurse
parameter will search all subdirectories as well.
This command will return a list of all .exe files found in the specified directory and its subdirectories.
If you want to search for specific .exe files with a particular name, you can use the Where-Object
cmdlet to filter the results further. For example, to find all .exe files with the name "myapp.exe", you can use:
powershellGet-ChildItem -Path "C:\Path\To\Search" -Filter "*.exe" -Recurse | Where-Object { $_.Name -eq "myapp.exe" }
This command will return a list of all .exe files named "myapp.exe" found in the specified directory and its subdirectories.