Flushing the Agent Cache


I was running into the issue that couldn’t reset the entire health for a client. The error looked something like this:

Health Explorer

I used the following script to flush the flush the agent cache.

You can download the script from here

After running the script my client’s became back Healthy.


You need the enable the Remote Server Management on the client servers you want to manage. I took the following steps to enable remote PowerShell on my remote servers:

  1. Start the “Group Policy Management” console
  2. Right click on the “Organizational Unit”than you are going to use and click “Create a GPO in this domain, and link it here…Remote Powershell

  3. In the “New GPO” wizard give the Group Policy “Name” and click “OKRemote Powershell
  4. Right click on the created Group Policy and click “EditRemote Powershell
  5. Navigate to the following path “Computer Configuration\Policies\Administrative Templates\Windows Components\Windows Remote Management(WinRM)\WinRM ServiceRemote Powershell
  6. On the “Group Policy Management Editor” screen double click “Allow automatic configuration of listeners
  7. Double click on the “Allow automatic configuration of listeners”, “Enable” the policy and set the IPv4/IPv6 “(*)Remote Powershell
  8. Navigate to the “Computer Configuration\Policies\Windows Settings\Security Settings\System ServicesRemote Powershell
  9. Double click “Windows Remote Management (WS-Management)” service and set it for automatic startup.Remote Powershell
  10. Navigate to “Computer Configuration\Policies\Windows Settings\Security Settings\Windows Firewall with advanced Security\Windows Firewall with Advanced Security\Inbound Rules
  11. Right click on “Inbound Rules” and click “New RuleRemote Powershell 8
  12. On the “New Inbound Rule Wizard” page, on the section “” select “Predefined” and from the pull down menu select “Windows remote Management” and click “NextRemote Powershell
  13. On the “New Inbound Rule Wizard” page, on the “Predifined Rules” section click “NextRemote Powershell
  14. On the “New Inbound Rule Wizard” page, on the “Action” section, select “Allow the connection” and click “FinishRemote Powershell