【发布时间】:2017-05-18 13:41:00
【问题描述】:
我已经从下面的链接下载了 PowerShell 脚本。
https://gallery.technet.microsoft.com/scriptcenter/PowerShell-Perfmon-0f013da8
我能够在本地机器上成功运行此脚本,但在远程机器上遇到问题。我更新了下面的代码
(Get-Counter -ComputerName $ComputerName -Counter (Convert-HString -HString $Counter) -SampleInterval 2 -MaxSamples 10).counterSamples
跟随。
(Invoke-Command -ComputerName $ComputerName -ScriptBlock {Get-Counter -Counter (Convert-HString -HString $Counter) -SampleInterval 2 -MaxSamples 10}).counterSamples
现在我遇到了错误。
The term 'Convert-HString' is not recognized as the name of a cmdlet, function, script file, or operable program.
【问题讨论】:
标签: powershell remoting