Q: My Configuration Manager 2012 client isn't correctly receiving policies--how do I force the client to delete all its policy and download again?

Here's a script to flush out a Configuration Manager 2012 client's policies and force a policy download.

John Savill

December 17, 2012

1 Min Read
Q: My Configuration Manager 2012 client isn't correctly receiving policies--how do I force the client to delete all its policy and download again?

A: The script below can be executed to flush out all policy and force the policy to be downloaded again for a System Center 2012 Configuration Manager client. After it's executed, check the PolicyAgent.log file on the client for the policy download status.

Set oWMI = GetObject("winmgmts://./root/ccm")
set oClient = oWMI.Get("SMS_Client")
oClient.ResetPolicy(0)
Set cpApplet = CreateObject("CPAPPLET.CPAppletMgr")
Set oCommands = cpApplet.GetClientActions 
For Each oAction In oCommands
    If UCase(oAction.name) = UCase("Request & Evaluate Machine Policy") then
        oAction.PerformAction
    End If
Next

The script needs to be ran from an elevated command prompt.

cscript sccmclientpolreset.vbs

Looking at the PolicyAgent.log file (in the C:WindowsCCMLogs folder) using notepad or cmtrace (which is part of the Configuration Manager server), you should be able to see the new download of policy. To learn more about System Center Configuration Manager 2012, check out more of John's FAQs such as this one: "Q: How do I automatically approve and deploy updates with System Center Configuration Manager 2012?"

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like