How to reset the policy or request a Full policy retrieval for a SMS agent
We have situations where we need to reset the policy and the policy spy which we use does not work or would not prefer to copy the tool.
This is a vbscript which we can use. Found it helpful when you want to request a full policy compared to delta policy which usually is
triggered always (except for the first).
'===============================================================================
'Save this as .VBS file and use Run as Administrator
'Set oParams.uFlags = 0 for making the next policy request will be for a full policy instead of the change in policy since the last policy request.
'Set oParams.uFlags = 1 The existing policy will be purged completely.
'Author: Sudheeesh N
'-------------------------------------------------------------------------------
set oCCMNamespace = GetObject("winmgmts:root\ccm")
Set oInstance = oCCMNamespace.Get("SMS_Client")
set oParams =
oInstance.Methods_("ResetPolicy").inParameters.SpawnInstance_()
oParams.uFlags = 0
oCCMNamespace.ExecMethod "SMS_Client",
"ResetPolicy", oParams
'---------------------------------------------------------------------------------
This posting /Script is provided "AS IS" with no warranties and confers no rights.