How to: Exectue a ConfigMgr 2012 Auto Deployment Rule (ADR)

Here’s a quick example for how to initiate an ADR using PowerShell:

(gwmi sms_autodeployment -namespace root\sms\site_cas -computer MyServer -filter "Name='FEP Updates'").EvaluateAutoDeployment()

Replace CAS with your site code, and MyServer with the server name. My ADR is “FEP Updates”, so replace that with the desired ADR to run. Remember that ADRs are dependent on the WSUS synchronization, so if you re-evaluate the ADR without a new WSUS synchronization, you may not see any change in your ADR.

If you really want to party, and desire to re-run all ADRs, run the following command:

gwmi sms_autodeployment -namespace root\sms\site_cas -computer MyServer | foreach-object {$_.EvaluateAutoDeployment()}

This will find all ADRs, and call the EvaluateAutoDeployment method on each one.
Happy Scripting,

Greg

ramseyg@hotmail.com

About Greg Ramsey
Greg Ramsey, Enterprise Mobility MVP, is a Senior Enterprise Architect at Dell Technologies. He has a B.S. in Computer Sciences and Engineering from Ohio State University and has co-authored many books over the years. Greg is an international speaker, a board member of the Northwest System Center User Group, and the Director of Communications for the Midwest Management Summit.

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 )

Google photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s

%d bloggers like this: