Tuesday, March 31, 2009

SMS Module Updated

I updated the SMS Module (old post here) for PowerShell v2. I'm using it with v2 CTP3. Now you can type "help " to get help on these functions, and check out the old post for more examples of how you can use the Get-SmsWmi and Find-SmsId functions.

Functions included are:
  • Get-SmsWmi - Makes it easy to get WMI objects from the SMS Provider. (Note: call this function with no parameters to get a list of acceptable class nicknames)
  • Find-SmsId - Look up SMS WMI objects by ResourceID, CollectionID, PackageID, or AdvertisementID
  • Get-SmsCollectionTree - Inspired by tree.com from DOS, prints out the Collection structure of your site, with CollectionIDs and names.
  • Approve-Client - Marks an SCCM client as Approved in the SCCM DB.
Don't forget to set the $default_wmi_provider_server and $default_site variables at the top of the module to match your environment.