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
Hello,
I was wondering if it would be possible to retrieve G Suite user information, by the list of pending mobile devices, in a different way rather than using, for example:
But, the above isn't so good if there are multiple users with same 'Name'.
I can see only two properties Email (containing multiple values/aliases) and Name that could be passed to Get-GSUser.
I could also retrieve only one e-mail address (Email property) for each mobile device and pass it to Get-GSUser cmdlet:
Hello, I was wondering if it would be possible to retrieve G Suite user information, by the list of pending mobile devices, in a different way rather than using, for example:
GSMobileDevice -Filter "status:pending" | %{Get-GSUser -Filter "name:$($_.Name)"}
But, the above isn't so good if there are multiple users with same 'Name'. I can see only two properties Email (containing multiple values/aliases) and Name that could be passed to Get-GSUser. I could also retrieve only one e-mail address (Email property) for each mobile device and pass it to Get-GSUser cmdlet:
GSMobileDevice -Filter "status:pending" | Select-Object @{L="Email";E={$_.Email | Select-Object -First 1}} | Get-GSUser
Anything else ?
Thank you, Luca