SCOM: Delete Contents of Health Service State Folder
This article will resolve a SCOM agent in a ‘Not Monitored’ state on the Operations Manager console
- Log onto a server that has the Operations Manager console installed
- In the Operations Manager window, click Monitoring, then click Windows Computers
- Take note of which servers, if any, are in a ‘Not Monitored’ state
- Add the server name (FQDN) to a text file. Save the text file as servers.txt on the C: drive
- Open Powershell as an Administrator, then copy and paste the command below
- Hit enter to run the command
$server =Get-Content C:\servers.txt
Invoke-Command -ComputerName $server -ScriptBlock {
net stop HealthService
Remove-Item -Path "C:\Program Files\Microsoft Monitoring Agent\Agent\Health Service State" -Recurse -Confirm:$false
net start HealthService
}