Powershell 在远程计算机上查找进程的路径

Powershell 在远程计算机上查找进程的路径,powershell,windows-services,remote-access,Powershell,Windows Services,Remote Access,您可以在Powershell中使用以下命令获取特定进程运行位置的完整路径: Get-Process | where{$_.Name -like "*iexplore*"} | Select Path 如果我想为远程机器上的服务找到此路径,我想我可以利用以下方法: Get-Process -ComputerName $MyServer | where{$_.Name -like "*iexplore*"} | Select Path 但是,这不会返回任何内容。我可以看到,我可以找到服务本身的一

您可以在Powershell中使用以下命令获取特定进程运行位置的完整路径:

Get-Process | where{$_.Name -like "*iexplore*"} | Select Path
如果我想为远程机器上的服务找到此路径,我想我可以利用以下方法:

Get-Process -ComputerName $MyServer | where{$_.Name -like "*iexplore*"} | Select Path
但是,这不会返回任何内容。我可以看到,我可以找到服务本身的一些细节,目前的使用情况等,但我找不到路径的.exe文件所在地。(我还注意到,我无法看到进程正在使用多少CPU)


有办法找到进程的路径吗?

获取进程
缺少此项,但您可以使用WMI:

Get-WmiObject -Class win32_process -ComputerName $MyServer -Filter 'name like "%iexplore%"' | select path