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
235 stars 67 forks source link

Update/Set group type ie distribution/discussion/collaborative inbox #184

Closed n-searle closed 5 years ago

n-searle commented 5 years ago

Hiya,

Is it possible to add the functionality to set group type with Set-GSGroupSettings / Update-GSGroupSettings.

I would like to be able to create groups and set them to one of the following: image

Cheers

P.S the cached sessions are working excellently :D

scrthq commented 5 years ago

Hey @n-searle - I don't think the API supports those types directly out of the box, but I should be able to add something like a Template parameter that has those as options and wraps the actual settings that correspond to each. Checking it out!

scrthq commented 5 years ago

and awesome to hear about the cached sessions! that's fantastic :D

scrthq commented 5 years ago

So it looks like the only Group Type that can be adjusted with the latest version of the API is Enabling/Disabling the Collaborative Inbox feature:

image

I'l get that added in ASAP and see if there's a way to pass the canned settings for the other group types or if those truly aren't doable

n-searle commented 5 years ago

Hey,

That sounds great, the collaborative inbox feature was the one I was mainly looking for but if there is a way to template the others that sounds even better.

Thanks for looking into it :)

scrthq commented 5 years ago

hey @n-searle - this will likely take me a little bit to implement, primarily since the field is read-only either until Monday when the update for that API goes live or possibly indefinitely read-only, but I'll need to wait until at least next week to test. I'll try and work on what I can in the meantime :D

scrthq commented 5 years ago

Hey @n-searle - This should be doable now in 2.29.0! EnableCollaborativeInbox is a new Switch parameter on Update-GSGroupSettings. Pass as-is to enable, otherwise flag as false to disable, i.e. Update-GSGroupSettings -EnableCollaborativeInbox:$false ....

n-searle commented 5 years ago

Heya,

Awesome, thanks for implementing :)