Powershell script to refresh SCCM client machine policy

I’ve been working with SCCM for a few months.  As some might know, forcing SCCM to “test now” is a bit of a process.   Here is a script I use to force the client to check for new advertisements.  It’s been handy when performing testing.  Hope you find this helpful


$Computer = “.”
$Class = “SMS_Client”
$Method = “TriggerSchedule”
$Sched = “{00000000-0000-0000-0000-000000000021}”
$MC = [WmiClass]”\$ComputerROOTccm:$Class”

$InParams = $mc.psbase.GetMethodParameters($Method)

$InParams.sScheduleID = $Sched

“Calling SMS_Client. : TriggerSchedule with Parameters :”
$inparams.PSBase.properties | select name,Value | format-Table

$R = $mc.PSBase.InvokeMethod($Method, $inParams, $Null)
“Result :”
$R | Format-list

Here is a screenshot of how you refresh the Machine Policy on the client.  This forces the client to check for new policy (aka Advertisements).

Thank you,

Steve Schofield
Windows Server MVP – IIS

Enteprise Log management solution
Install, Configure, Forget

Questions on Microsoft SMTP Service – visit http://www.smtp.ws
IIS Community Newsletter – visit http://www.iisnewsletter.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: