-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get-GSGroup and Subdomains #96
Comments
Hey @IronKane2 - Definitely can be added! Excellent suggestion 😄 Currently, it looks at the |
CC @phatmandrake - I should be able to get Group Query functionality in there as well (@phatmandrake requested this in a previous issue and I actually just got it working with the .NET SDK). |
That'll be awesome. I have a few thousand leftover groups from a former vendor to remove. |
I'll have you sorted by tonight! 😄 |
Could you test one thing for me and see if # Replace with actual subdomain you're looking for
$thatSubDomain = 'oldvendor.com'
# Store the current config in a var so we can easily revert after testing
$currentConf = Show-PSGSuiteConfig
# Update the config with the specific subdomain you're looking to
# query as the Domain and set Preference to 'Domain'
Set-PSGSuiteConfig -Domain $thatSubDomain -Preference Domain
# Run Get-GSGroup with verbose enabled, you should see the following verbose message:
# "VERBOSE: Getting all G Suite groups for domain '$thatSubDomain'"
$groups = Get-GSGroup -Verbose
# Restore your original config
$currentConf | Set-PSGSuiteConfig
# Explore the Group list to ensure it has the groups you're expecting
($groups | Where-Object {$_.Email -like "*@$($thatSubDomain)"}).Count |
PS C:> $groups = Get-GSGroup -Verbose
|
🤔 odd! I'm assuming that domain is within the domains your overall customer account owns, correct? |
djusd.net is parent domain of djusdstudents.org. I'm SA and have full control of both. I'm able to create djusdstudents.org accounts with New-GSUser for which I'll be eternally grateful. Path would be djusd.net/djusdstudents.org/... |
PS C:> Get-GSGroup 4science_3_e010223_1_p1_210-1415@djusdstudents.org Group : 4science_3_e010223_1_p1_210-1415@djusdstudents.org |
Is the current |
PS C:> Get-GSGroup | ?{$.email -like '*@djusdstudents.org'} returns nothing. While doing Get-GSGroup | ?{$.email -like 'willett'} will pull up djusd.net groups |
Preference is set to "Domain" |
Can you set your preference to "CustomerID" instead and retry that |
That did it! And it's still scrolling lol |
12,688 groups. I believe you've been a big help. |
nice! Your original request is still very valid though and it's still on my TODO list to get handled tonight 💪 |
PSGSuite v2.15.4 now available on the PS Gallery! Update notes: 2.15.4
|
I am having a similar issue I cannot get around. I've set my PSGsuiteConfig Preference to "CustomerID" as instructed. However, I am still receiving the below error. Get-GSGroup : Exception calling "Execute" with "0" argument(s): "Google.Apis.Requests.RequestError
I can run Get-GSGroup against an individual group or CSV import but not the command by itself. I am an SA in GSuite and have literally added every API that has the word "Group" in it trying to troubleshoot. Any help on this issue at all would be much appreciated. |
Get-GSGroup can find a group in a subdomain by exact email address, but it won't pull up any of these groups in List Mode so it's not filterable. Can a -Domain parameter be added?
The text was updated successfully, but these errors were encountered: