Script Download: 22236.zip http://gallery.technet.microsoft.com/scriptcenter/Create-User-Collections-45608dc9
Currently, you often need to create user collections based on user groups in Active Directory. After that, you can deploy applications and packages for specific users. Usually an Active Directory contains a lot of user groups, but it's a time consuming task to create collections based on user groups in SCCM console.
So you need to use a script to reduce your workload.
You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery