Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

SMS 2003 contained a great feature for automation via the excellent dll: Microsoft.SystemsManagementServer.Automation.dll. It allowed automating SMS using intuitive objects, properties and methods such as:


In SCCM 2007, it seems this great dll has been deprecated in favor of more WMI style "dog's breakfast" code:

var conn = new WMIConnection(@"\\Server\root\sms\site_a", usr, pass);
var queryResults = conn.ExecuteQuery("SELECT * FROM SMS_Package WHERE 
                                      Name='" + packageName + "'");
foreach (ManagementObject obj in queryResults)
    packageID = (string)obj.GetPropertyValue("PackageID");

I am tempted to write my own skeleton classes around these wmi calls. All that seems needed for basic automation would seem to be: SccmServer, SccmPackage, SccmProgram and SccmTaskSequence.

The question is: does anyone have wrapper, skeleton classes like this available, or know of any open source projects that I can use or adapt? I hate reinventing the wheel for mundane stuff like this.

share|improve this question
Just for the record, I already found this:…. The question is if someone has started wrapping the new SCCM2007 calls in better wrapper classes. – Stein Åsmul Oct 9 '09 at 23:33

This isn't quite as what you are looking for but have you had a look at using Powershell and SCCM to take some of the WMI pain away?

You might also want to look at:

There don't seem to be many Powershell cmdlets yet that provide the same level of functionality as Microsoft.SystemsManagementServer.Automation.dll but I did find PowerShell Community Extensions for Configuration Manager.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.