How do I ask PowerShell where something is?
For instance, \"which notepad\" and it returns the directory where the notepad.exe is run from according to the current
Check this PowerShell Which.
The code provided there suggests this:
($Env:Path).Split(";") | Get-ChildItem -filter notepad.exe