在远程机器上查找进程路径
Finding path of process on remote machine
您可以在 Powershell 中使用以下命令获取特定进程所在位置的完整路径 运行:
Get-Process | where{$_.Name -like "*iexplore*"} | Select Path
如果我想在远程机器上找到服务的路径,我想我可以使用以下方法:
Get-Process -ComputerName $MyServer | where{$_.Name -like "*iexplore*"} | Select Path
但是,这 return 没有任何意义。我可以看到我可以找到服务本身以及有关当前使用情况等的一些详细信息,但我找不到 .exe 文件所在的路径。 (我还注意到我看不到进程使用了多少个 CPU)。
有没有办法找到进程的路径?
Get-Process
缺少这个,但你可以使用 WMI:
Get-WmiObject -Class win32_process -ComputerName $MyServer -Filter 'name like "%iexplore%"' | select path
您可以在 Powershell 中使用以下命令获取特定进程所在位置的完整路径 运行:
Get-Process | where{$_.Name -like "*iexplore*"} | Select Path
如果我想在远程机器上找到服务的路径,我想我可以使用以下方法:
Get-Process -ComputerName $MyServer | where{$_.Name -like "*iexplore*"} | Select Path
但是,这 return 没有任何意义。我可以看到我可以找到服务本身以及有关当前使用情况等的一些详细信息,但我找不到 .exe 文件所在的路径。 (我还注意到我看不到进程使用了多少个 CPU)。
有没有办法找到进程的路径?
Get-Process
缺少这个,但你可以使用 WMI:
Get-WmiObject -Class win32_process -ComputerName $MyServer -Filter 'name like "%iexplore%"' | select path