One of the big new features in SCCM 2012 SP1 is is the PowerShell module. Powershell is really great for automation.
If you are using AD group membership together with dynamic collection rules to target and deploy applications, you probably have spent hours creating collections, ad groups and queries.
I have created a simple PowerShell script to automate this task, feel free to modify the script to fit your needs.
For the script to be able to create AD Group, install the active Directory PowerShell module on the server or client that you run your ConfigMgr Console from. You will also need to enable AD Group discovery in SCCM.
Code: Download here
- Two collections is created for the application.
- Install collection Properties
- Uninstall collection properties