Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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:

SMSProvider.Packages.Create("NewPackage");

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: social.technet.microsoft.com/Forums/en-US/configmgrsdk/thread/…. The question is if someone has started wrapping the new SCCM2007 calls in better wrapper classes. –  Stein Åsmul Oct 9 '09 at 23:33

1 Answer 1

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

 
discard

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.