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 https://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 .