SCCM Module for PowerShell
In a post a few days ago I mentioned “some slightly modified functions from Michael Niehaus“.
Well… Why not share them.
Save this as a module, load it and play around.
2010-03-26 – Moved to http://www.snowland.se/sccm-posh/
Some examples on what you can do:
# List all available SCCM commands Get-SCCMCommands # Create an SCCM-Connection to the local server $sccm = Connect-SCCMServer -Verbose # Create a new collection with a collection rule $newCollection = New-SCCMCollection -SccmServer $sccm -name "Some Collection Name" -Verbose Add-SCCMCollectionRule -Server $sccm -collectionID $newRoot.CollectionId -queryExpression "SELECT * FROM SMS_R_System" -queryRuleName "All Systems" -Verbose # Count files in the inboxes $sccm | Get-SCCMInboxes # Get a package $MyPackage = Get-SCCMPackage -server $sccm -filter "Name = 'Some Package Name'"
If you have some comments, ideas and things to add… Comment this post or shoot me an email.





2010-03-23 16:12
Update: Fixed some small bugs and added limitToCollectionId in Add-SCCMCollectionRule
2010-08-24 08:56
[...] I found a module for use with System Center Configuration Manager (SCCM). This module contains the following [...]
2010-09-04 16:41
[...] I found a module for use with System Center Configuration Manager (SCCM). This module contains the following [...]