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
Describe the bug
I try get all licenses from suspended accounts and create array. And got WARNING: No license found for USER@DOMAIN.com!
If i put only 1 user all fine:
$GCPUsers = Get-GSUser -User "USER@DOMAIN.com" | Select User, PrimaryEmail, CreationTime, LastLoginTime, @{Name='GSuite';Expression={SearchGSuiteUserLicenses($_.User)}}
Describe the bug I try get all licenses from suspended accounts and create array. And got WARNING: No license found for USER@DOMAIN.com!
If i put only 1 user all fine: $GCPUsers = Get-GSUser -User "USER@DOMAIN.com" | Select User, PrimaryEmail, CreationTime, LastLoginTime, @{Name='GSuite';Expression={SearchGSuiteUserLicenses($_.User)}}
To Reproduce Steps to reproduce the behavior:
function SearchGSuiteUserLicenses($UserEmail) {
Check GSuite Licenses
}
$GCPUsers = Get-GSUser -Filter "IsSuspended -eq '$true'" | Select User, PrimaryEmail, CreationTime, LastLoginTime, @{Name='GSuiteLicense';Expression={SearchGSuiteUserLicenses($_.User)}}