一个 Powershell 命令如何在远程机器上运行,而另一个来自同一控制台的却不行?
PS C:> Get-Service -Name WinRM -ComputerName win8
状态名称 DisplayName
------ ---- ------------
运行 WinRM Windows 远程管理 (WS-Manag...PS C:> Get-Counter '\Paging File(*)\% Usage' -ComputerName win8 Get-Counter : 无法连接到指定的电脑或电脑离线。在行:1 字符:1
- Get-Counter '\Paging File(*)\% Usage' -ComputerName win8
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
- CategoryInfo : InvalidResult: (:) [Get-Counter],异常
- FullyQualifiedErrorId : CounterApiError,Microsoft.PowerShell.Commands.GetCount erCommand