Powershell: get-cmcollection not returning ObjectPath
The PowerShell cmdlets Get-CMCollection and Get-CMDeviceCollection/Get-CMUserCollection) returns an empty value for "ObjectPath".
This is missing in both 1710 and latest TP (currenty 1801).
This works as expected and ObjectPath = "/":
Get-WmiObject -namespace "root\sms\site$siteCode" -query "select * from SMSCollection where CollectionID = 'SMS00001'"
This returns null/empty ObjectPath:
Get-CMCollection -Id SMS00001
AdminAdam Meltzer (ConfigMgr Product Team) (Software Engineer, Microsoft Endpoint Configuration Manager) commented
No update to share at this time. This is a known issue and we have a bug open on it internally.
For the time being, you can work around this by adding -Option Fast to Invoke-CMWmiQuery.
Kris Nelson commented
Is there any update on this? The bug still seems to be present as of SCCM 1906.
Tnx Adam for the update, already worked around it for my current needs, just wanted to report it :)