Have you always been annoyed by the default collections cluttering up the view in your ConfigMgr console, well there’s a way that you can store them away under a separate collection. I found this blog post (http://verbalprocessor.com/2009/03/20/how-to-move-collections-in-configmgr) a while ago solving the problem. But hey I’m a lazy guy and after all, I’m installing lots of ConfigMgr servers out at customer sites, so automation is the key that drives lazy admins, right? So in this post I will walk you through using a script that can move collections based on either the name or comment of the collection/collections you want to move.
First up, you need to know some stuff from your environment, like the name of your server and site code. Also you need to know the Collection ID where you want to save the collection to. Start out by going to your ConfigMgr console and locate the site code, you will find it here:
Then create a new collection and localize the Collection ID, like this:
Next up download the script (from the bottom of this post) and save it to an appropriate location on your site server, in this case I saved it to the location F:\UTV\Scripts. Then edit the section with site server (I run it on the ConfigMgr server so the name is set to ".") and site code plus the Collection ID of your newly created collection in the script. Also, in this case I will move the collection based on the name they have, so in the script I enter “All%”, which basically means all collections that starts with All… something.
Start an elevated CMD prompt and run the script like below:
Your output should look similar to this:
Finally refresh you console and your should end up like this:
Hope this help, you can also move collection based on comments just edit the beginning of the script something like this (based on the fact that you have collections with comment like Move).
The script can be downloaded here:
MoveCollections1.0.zip (1.11 kb)