Created
December 18, 2018 15:22
-
-
Save mczerniawski/1c857021924bfd604ce847ecf5f89de7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach ($server in $ServerList) { | |
#Generate all variables | |
$resultCounters = Invoke-Command -ComputerName $server -Credential $Credential -ScriptBlock { | |
param( | |
$MetricList | |
) | |
Get-Counter -Counter $MetricList -SampleInterval 10 -MaxSamples 10 | |
} -ArgumentList $MetricList | |
$resultCounters | Export-Counter -Path $path -FileFormat $fileFormat | |
#... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment