Nov 30 2021 06:10 AM
Good day. I would like to know about all possible ways to obtain the process execution path in powershell. I am aware of Get-Process *process name* | Select-Object Path, but looking for another, as this one does not provide the path in some cases. Is there any way that works in 100% cases (testing with both administrator and NT Authority\System privileges)?
Dec 06 2021 03:25 PM
Hello @TrapTheOnly,
Did you look into WMI Win32_Process class and it's property ExecutablePath?
Get-CimInstance Win32_Process
Hope that helps.