Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: Script to query perfmon (.blg) files

$
0
0

It looks lke Import-Counter also has a -ListSet parameter. Your script could run that command against the blg files, then compare your $Counter parameter (using wildcards to the list) before running Import-Counter again with the matching values. Something like this, though I haven't tested it:

$counterList = @(Import-Counter -ListSet $env:exchangeinstallpath\Logging\Diagnostics\DailyPerformanceLogs\*.blg)
$counterList = $counterList -like "\\$Server\$Counter"
$Data = Import-Counter -Path $env:exchangeinstallpath\Logging\Diagnostics\DailyPerformanceLogs\*.blg -Counter $counterList

Viewing all articles
Browse latest Browse all 13067

Trending Articles