0
아래 링크에서 PowerShell 스크립트를 다운로드했습니다.PowerShell Remoting 성능 카운터 수집
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.
하는 것은 귀하가 제공시겠습니까 예. –
이 링크에서 스크립트를 다운로드하고 scriptblock이 호출하려고하기 전에 호출하려는 함수를 스크립트 블록에 붙여 넣었습니다 –
위 코드를 사용하는 중에 오류가 발생합니다. 필수 인수가 누락되었거나 올바르지 않습니다. + CategoryInfo : InvalidResult : (:) [가져 오기 - 카운터, 예외 + FullyQualifiedErrorId : CounterApiError, Microsoft.PowerShell.Commands.GetCounterCommand +에는 PsComputerName : 전화가 오기-카운터가 같은 잘못된 것이 서버 1 –