# Windows Server Latency Diagnostic Script

# Run in PowerShell with Administrator privileges


Write-Host "=== CPU & Memory Usage ==="

Get-Counter '\Processor(_Total)\% Processor Time'

Get-Counter '\Memory\Available MBytes'


Write-Host "`n=== Top Processes by CPU ==="

Get-Process | Sort-Object CPU -Descending | Select-Object -First 10 Name, CPU


Write-Host "`n=== Disk I/O Performance ==="

Get-Counter '\PhysicalDisk(_Total)\Avg. Disk sec/Read'

Get-Counter '\PhysicalDisk(_Total)\Avg. Disk sec/Write'

Get-Counter '\PhysicalDisk(_Total)\Disk Transfers/sec'


Write-Host "`n=== Network Latency (Ping Test) ==="

Test-Connection -ComputerName google.com -Count 4


Write-Host "`n=== TCP Settings ==="

Get-NetTCPSetting | Format-Table SettingName, CongestionProvider, AutoTuningLevelLocal


Write-Host "`n=== Event Viewer Errors (Last 50) ==="

Get-EventLog -LogName System -EntryType Error -Newest 50 | Format-Table TimeGenerated, Source, EventID, Message


Comments

Popular posts from this blog

Troubleshooting Netlogon Error Codes

Troubleshooting SCEP certificate profile deployment to Android devices in Microsoft Intune