我一直在试图对远程计算机运行Microsoft的GetNetworkStatistics脚本 ,以使我们能够跟踪哪些进程正在使用带宽以及其他工具。
我无法对远程Windows 7客户端运行脚本。 在远程和本地运行Windows Server 2012 R2计算机时,它工作正常。 在Windows 7计算机上本地运行时也可以正常工作。
我已经在Windows 7客户端上运行了Enable-PSRemoting,并且允许在Windows防火墙中使用Windows远程pipe理和Windows Management Instrumentation。
这是我在远程Windows 7计算机上运行时遇到的错误
WARNING: Could not run Get-Process -computername win7. Verify permissions and connectivity. Defaulting to no ShowProcessNames 'C:\netstat.txt' on win7 converted to '\\win7\C$\netstat.txt'. This path is not accessible from your system. At C:\Users\user\Desktop\Get-NetworkStatistics.ps1:200 char:25 + Throw "'$tempFile' on $computername converted to '$remot ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: ('C:\netstat.txt...om your system.:String) [], RuntimeException + FullyQualifiedErrorId : 'C:\netstat.txt' on win7 converted to '\\win7\C$\netstat.txt'. This path is not accessi ble from your system.
我已经尝试运行远程Windows 7客户端的本地工作,但不是远程(它可以远程和本地对Windows Server 2012 R2工作)的获取进程。
我还运行了Invoke-Command {get-process} -computername $machinename -credential $domain\admin 。 而提供正确的凭据后,它仍然yeilds相同的结果。
任何帮助将不胜感激。
确保WinRM正在远程系统上运行。 基于给出的错误,听起来好像不是。 检查你的防火墙设置。
Windows远程pipe理
如果系统是域的一部分,您可以将您的组策略设置为自动打开要使用PowerShell远程pipe理的机器。
只有Windows服务器默认打开了这个function。 Windows客户端默认closures它。