How to monitor Windows Server performance from PowerShell using Get-Counter
Performance Monitor gives you graphs. Get-Counter gives you data — in the terminal, in variables, in CSV files, in scripts that run unattended at 3am. It reads the same performance counter infrastructure that PerfMon uses, but from PowerShell, which means…