Starting with Configuration Manager 2012 R2 we have a cmdlet called Move-CMObject. This cmdlet allows to move different objects in Admin Console. We still don’t have a cmdlet that allows to create ConfigMgr Admin Console folders but if necessary you can use this code to create folders.
Here are 6 different examples How to move objects in ConfigMgr Admin Console
# Example 1 $CMCollection = Get-CMDeviceCollection -Name "OSD - Windows 8.1" Move-CMObject -FolderPath "PS1:\DeviceCollection\OSD" -InputObject $CMCollection # Example 2 $CollectionID = "PS10036C" Move-CMObject -FolderPath "PS1:\DeviceCollection\OSD" -ObjectId $CollectionID # Example 3 $ConfigurationItem = Get-CMConfigurationItem -Name "Business Hours" Move-CMObject -FolderPath "PS1:\ConfigurationItem\LOB" -InputObject $ConfigurationItem # Example 4 $ConfigurationItem = Get-CMConfigurationItem -Name "Cache Size" Move-CMObject -FolderPath "PS1:\ConfigurationItem" -ObjectId $ConfigurationItem.ModelName # Example 5 $Application = Get-CMApplication -Name "Mozilla FireFox v7" Move-CMObject -FolderPath "PS1:\Application\LOB" -ObjectId $Application.ModelName # Example 6 $Application = Get-CMApplication -Name "Company Portal" Move-CMObject -FolderPath "PS1:\Application\LOB\QA" -InputObject $Application
As you see it is really easy to move objects. You can use –InputObject or -ObjectId parameter.
Best
Hi.
I have problems with the “Move-CMObject” function in the latest Cmdlets released 0517, is there anyone more that has problems?.
Move-CMObject : No object corresponds to the specified parameters.
BR
Rickard
I am seeing the same error with Move-CMObject. I am attempting to use the latest cmdlets with SCCM 2012 R2 SP1. I have not tried earlier versions of the cmdlets.
My driver import script was working fine with previous version of Configmgr cmdlets with SCCM 2012 R2 SP1. Can no longer get Move-CMObject to work without reverting to previous version cmdlets.
After a little bit of research, it appears they already know about this bug:
https://connect.microsoft.com/ConfigurationManagervnext/Feedback/Details/2726157
Yes, known issue – http://blog.coretech.dk/kaj/configmgr-move-cmoject-issue-and-one-possible-workaround/
Looks like Move-CMObject is fixed in 1610.
Hi,
Could you please advise on PS for moving folders(Collection subfolders, Application subfolders, Package Subfolders).
I am trying to move all the Package sub-folders into a folder.
Thanks.