Improve folder support in cmdlets
Actually, it is possible to create a collection with a cmdlet. But we cannot create it in a specific location. We need moving it after creating the collection. Why not just add a parameter to the New-CMDeviceCollection cmdlet?
Thank you for your feedback. Folder support is something that is very limited in the cmdlet library today and something that’s in our backlog to improve in a future release. In my opinion, I think the way things should work is if you’re in a collection folder in the cmdlet drive provider, it should just create the collection in the right place.
I’ve linked this feedback to our internal work item to improve folder support so this doesn’t get lost.
Currently the Get-CMObjectSecurityScope cmdlet does not support folders (SMS_ObjectContainerNode), making it difficult to audit security scopes on folders. However, Set-CMObjectSecurityScope does work for folders.
Additionally, the built-in "Security for a specific or multiple Configuration Manager objects" report in the console has an Object Type option for SMS_ObjectContainerNode but the report comes back blank.
Tauno Vürmer commented
get-childitem is not working in sccm device collections folders, to achieve this, it has to be done via WMI, which is not very convenient at times. Is it possible to add this feature?
I would like to be able to use Get-CMApplication, Get-CMObject, Get-CMPackage, Get-CMCollection, etc. and be able to see the parent folder name, and the full location of the Object back to the top level such as Collections\ParentFolder\ChildFolder\CollectionName.
This is a big oversight from what I can see.
It makes it very hard to work with all objects in the current folder.
I would like to be able to perform a task such as getting all the applications in a particular folder within applications, or all collections in from a folder in the collections folder structure, and then being able to reiterate through them.
Mike Eckerle commented
for others who were unsure how to accomplish this: https://blogs.msdn.microsoft.com/helaw/2013/10/26/whats-new-in-r2-configuration-manager-folders-and-organization-with-powershell/
Raphael Jülich commented
The ability to tell the New-cmcollection in which folder the Collection should be created would help immensely! I have a little PS-GUI that creates Application, Collection, Deployment and so on automatically but I wasnt able to get the script to move things into the correct Folders! I will try what I can do with move-item but it would be better to put it into the Sccm Module...
AdminAdam Meltzer (ConfigMgr Product Team) (Software Engineer, Microsoft Endpoint Configuration Manager) commented
There is limited "folder" support today through the drive provider. Get-Item/Move-Item/Rename-Item should all largely work.
We do recognize that the drive provider today has numerous caveats and limitations and this is something we plan to improve in a future release.
The ConfigurationManager module does not have any *-folder cmdlets.
I would like to see some created that allow for more folder manipulation within system centre configuration manager, for example Get-CMFolder -Name "Test" would provide me with the Folder ID, Name, Heirarchical Location in ConfigMgr and more!
As well as New-CMFolder, Move-CMFolder, Remove-CMFolder, etc!
I would also like to see the ability to add -Folder to other cmdlets, such as New-CMDeviceCollection -Name "Test" -Folder "TestFolder" so the collection called Test is made in the folder called TestFolder instead of the Device Collections root.
The folder names are different in the console and the cmdlet Move-CMObject.
Since this is a standard folder regardless of site code, the names should be the same.