SCRT-HQ / PSGSuite

Powershell module for Google / G Suite API calls wrapped in handy functions. Authentication is established using a service account via P12 key to negate the consent popup and allow for greater handsoff automation capabilities
https://psgsuite.io/
Apache License 2.0
234 stars 67 forks source link

Get-GSUser -Filter "Suspended -eq '$true'" causes exception #311

Closed sctib closed 3 years ago

sctib commented 3 years ago

I can run these and get the expected result: Get-GSUser -Filter "IsMailboxSetup -eq '$true'" | select-object user Get-GSUser -Filter "IsEnrolledIn2sv -eq '$true'" | select-object user

but when I run: Get-GSUser -Filter "Suspended -eq '$true'" | select-object user

I get the error:

Get-GSUser : Exception calling "Execute" with "0" argument(s): "Google.Apis.Requests.RequestError Invalid Input: query [400] Errors [ Message[Invalid Input: query] Location[ - ] Reason[invalid] Domain[global] ] " At line:1 char:1

boxstack commented 3 years ago

@sctib: use IsSuspended instead -> Get-GSUser -Filter "IsSuspended -eq '$true'"

sctib commented 3 years ago

@sctib: use IsSuspended instead -> Get-GSUser -Filter "IsSuspended -eq '$true'"

Thanks! It helps to read the documentation:-)