Create ConfigMgr Collections and Admin Console Folders with PowerShell

Starting from ConfigMgr 2012 R2 we can use New-Item PowerShell cmdlet to create ConfigMgr Admin Console folders. Here is one simple and quick PowerShell script that allows you to create folders and Collections and finally it moves the Collection to correct folder.

 

After the script execution you have 6 folders and in each folder Test x Collection – as you see it is really easy to create Collections and Folders with PowerShell.

image

image

 

Best,

Kaido

About the Author:

Kaido Järvemets
Configuration Manager MVP

3 Comments

  1. ITPirate December 18, 2014 at 14:34 - Reply

    Ciao Kaido,

    thanks for the basics. Wouldn’t it be a better way to switch the ‘PS1’
    New-Item -Name ‘OSD’ -Path ‘PS1:DeviceCollection’
    with the $SiteCode?
    New-Item -Name ‘OSD’ -Path $SiteCode’:DeviceCollection’
    It could be used for any environment no matter what the Site Code is.. ?

    Cheers,
    Alex

  2. Kaido Järvemets
    Kaido Järvemets December 22, 2014 at 20:07 - Reply

    Yes Alex, It is much better idea to use variables and make it dynamic.

    For this post my idea was to keep it simple and we even don´t need the Site Code:
    New-Item -Name TEST2 -Path .DeviceCollection

    or using the variable like this
    New-Item -Name TEST3 -Path “$($Sitecode.Name):DeviceCollection”

    Best,
    Kaido

  3. MicrosoftTouch January 18, 2015 at 19:06 - Reply

    […] et des collections au sein de la console SCCM 2012 R2. Vous pouvez retrouver le script ici: http://blog.coretech.dk/kaj/create-configmgr-collections-and-admin-console-folders-with-powershell/   Facebook Like (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if […]

Leave A Comment