SOLVED
Home

PowerShell Console Issue with Remove-CMDevice

Brian Mason
MVP

PowerShell Console Issue with Remove-CMDevice

This just started out of the blue for our Citrix servers - we're on 1606: PS CAS:\> Remove-CMDevice -Name Wkstn01 -Force -Verbose VERBOSE: Invoking cmdlet 'Get-CMDevice' Remove-CMDevice : System error. At line:1 char:1 + Remove-CMDevice -Name Wsktn01 -Force -Verbose + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Microsoft.Confi...veDeviceCommand:RemoveDeviceCommand) [Remove-CMDevice], ItemNotFoundException + FullyQualifiedErrorId : ItemNotFound,Microsoft.ConfigurationManagement.Cmdlets.Collections.Commands.RemoveDeviceCommand
1 Reply
Highlighted
Solution

Re: PowerShell Console Issue with Remove-CMDevice

OK so my work-around is to simply limit the collection in the 1st place so that I don't have to be full admin who sees SMS0001. For example, this works every time so I won't bother to ask Microsoft to look at this issue: Get-CMDevice -Name PCNAME -CollectionId PRI0000D | Remove-CMDevice -Force