Hi, I get the error below when I run the PowerShell script to remove duplicate objects.
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
PS C:\Windows\system32> -CMCollectionMember -CollectionName "Duplicate Workstations" | Remove-CMDevice -Force
-CMCollectionMember : The term '-CMCollectionMember' is not recognized as the name of a cmdlet, function, script file,
or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
At line:1 char:1
+ -CMCollectionMember -CollectionName "Duplicate Workstations" | Remove ...
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (-CMCollectionMember:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Windows\system32>