Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Get-Counter path is not correct

$
0
0

I'm to get this to run but keep getting this error: Get-Counter : The specified counter path could not be interpreted.

Any insight into this issue would be appreciated.

param($destserver, $destDB)
$destserver = "CCIIT23"
$destDB = "SSIMS_Prod"

$Servers = Get-SqlData $destserver $destDb "Select ServerName From ServerNames"
write-output $Servers


$CounterList = Get-SqlData $destserver $destDb "Select Counter From MemoryCounterList"
write-output $CounterList

$Servers | Foreach-Object {
    $Serv = $_; $CounterList | Foreach-Object {
        Get-Counter -Computer $Serv -Counter $_ -SampleInterval 1
        }
    }


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>