1

I'm trying to use the Get-BrokerDesktop cmdlet,

Like any other Powershell cmdlets I can pass it parameters to filter out the results to my needs. So, I could do something like,

Get-brokerdesktop  -RegistrationState Unregistered

Which would return an object that only has Unregistered as its RegistrationState.

How would I go about having the ones that are not Unregistered?

I tried,

Get-brokerdesktop  -RegistrationState -ne Unregistered

Which is invalid syntax.

scharette
  • 9,437
  • 8
  • 33
  • 67

1 Answers1

1

Actually, I just noticed an example at the bottom of the linked documentation...

The trick here is to use -Filter like so,

Get-BrokerDesktop -Filter { RegistrationState -ne 'Unregistered' }

Or even better in this case, as proposed by @TheIncorrigible1,

-Filter 'RegistrationState -ne "Unregistered"'
scharette
  • 9,437
  • 8
  • 33
  • 67