
Take a look at it on GitHub here: https://github.com/andrebocchini/sccm-powershell-automation-module Andre really did an awesome job on this module!
This Module for SCCM 2007 (which does not come with a set of PowerShell Cmdlets) allows you to query Computers, Collections, Advertisements etc... (Check the Full list of Cmdlets)
After inspecting the code, I tweaked some parts of the code, especially on the Get-WmiObject queries.
Those modifications are now part of the module.