From 8c53f2722f795de26bf3b8cb95ee632cc52afab6 Mon Sep 17 00:00:00 2001 From: gsa-hub <73730730+gsa-hub@users.noreply.github.com> Date: Sun, 1 Nov 2020 05:57:21 -0500 Subject: [PATCH 1/3] update parameters only Only bringing up-to-date group settings based on reference below, only changing the parameters. No change to Process. Reference: https://developers.google.com/admin-sdk/groups-settings/v1/reference/groups --- .../Public/Groups/Set-GSGroupSettings.ps1 | 344 ++++++++++-------- 1 file changed, 185 insertions(+), 159 deletions(-) diff --git a/PSGSuite/Public/Groups/Set-GSGroupSettings.ps1 b/PSGSuite/Public/Groups/Set-GSGroupSettings.ps1 index 8a2c6b73..f11078f2 100644 --- a/PSGSuite/Public/Groups/Set-GSGroupSettings.ps1 +++ b/PSGSuite/Public/Groups/Set-GSGroupSettings.ps1 @@ -5,6 +5,9 @@ function Set-GSGroupSettings { .DESCRIPTION Hard-sets the settings for a group + + Reference: + https://developers.google.com/admin-sdk/groups-settings/v1/reference/groups .PARAMETER Identity The primary email or unique Id of the group to set @@ -15,29 +18,30 @@ function Set-GSGroupSettings { .PARAMETER Description The new description of the group - .PARAMETER ArchiveOnly - If the group is archive only - .PARAMETER AllowExternalMembers Are external members allowed to join the group - .PARAMETER AllowGoogleCommunication - Is google allowed to contact admins - .PARAMETER AllowWebPosting If posting from web is allowed + .PARAMETER ArchiveOnly + If the group is archive only + .PARAMETER CustomFooterText Custom footer text - .PARAMETER CustomReplyToAddress - Default email to which reply to any message should go + .PARAMETER CustomReplyTo + Email address used when replying to a message if the replyTo property is set to REPLY_TO_CUSTOM .PARAMETER DefaultMessageDenyNotificationText - Default message deny notification message + Text of message sent when message is rejected to message's author + Requires SendMessageDenyNotification to be true - .PARAMETER Email - Email id of the group + .PARAMETER EnableCollaborativeInbox + Whether a collaborative inbox will remain turned on for the group + + .PARAMETER FavoriteRepliesOnTop + If favorite replies should be displayed above other replies .PARAMETER IncludeCustomFooter Whether to include custom footer @@ -48,80 +52,76 @@ function Set-GSGroupSettings { .PARAMETER IsArchived If the contents of the group are archived - .PARAMETER MaxMessageBytes - Maximum message size allowed - .PARAMETER MembersCanPostAsTheGroup Can members post using the group email address - .PARAMETER MessageDisplayFont - Default message display font - - Available values are: - * "DEFAULT_FONT" - * "FIXED_WIDTH_FONT" - .PARAMETER MessageModerationLevel - Moderation level for messages + Moderation level of incoming messages Available values are: * "MODERATE_ALL_MESSAGES" * "MODERATE_NON_MEMBERS" * "MODERATE_NEW_MEMBERS" - * "MODERATE_NONE" + * "MODERATE_NONE" -GApps Default + + .PARAMETER PrimaryLanguage + The primary language for group in format of RFC 3066 Language Tag accepted by Google Mail .PARAMETER ReplyTo - Who should the default reply to a message go to + who the default reply should go to Available values are: - * "REPLY_TO_CUSTOM" + * "REPLY_TO_CUSTOM" -Requires that CustomReplyTo must be set * "REPLY_TO_SENDER" * "REPLY_TO_LIST" * "REPLY_TO_OWNER" - * "REPLY_TO_IGNORE" + * "REPLY_TO_IGNORE" -GApps Default * "REPLY_TO_MANAGERS" .PARAMETER SendMessageDenyNotification - Should the member be notified if his message is denied by owner - - .PARAMETER ShowInGroupDirectory - Is the group listed in groups directory + Allows a member to be notified if the member's message to the group is denied by the group owner + If true, the property defaultMessageDenyNotificationText is dependent on this property .PARAMETER SpamModerationLevel - Moderation level for messages detected as spam + Specifies moderation levels for messages detected as spam Available values are: * "ALLOW" - * "MODERATE" + * "MODERATE" -GApps Default * "SILENTLY_MODERATE" * "REJECT" - .PARAMETER WhoCanAdd - Permissions to add members + .PARAMETER WhoCanAssistContent + Specifies who can moderate metadata + Note: In March 2019, the whoCanModerateMembers, whoCanModerateContent, and whoCanAssistContent parent properties were Available values are: - * "ALL_MANAGERS_CAN_ADD" - * "ALL_MEMBERS_CAN_ADD" - * "NONE_CAN_ADD" + * "ALL_MEMBERS" + * "OWNERS_AND_MANAGERS" + * "MANAGERS_ONLY" + * "OWNERS_ONLY" + * "NONE" -GApps Default .PARAMETER WhoCanContactOwner - Permission to contact owner of the group via web UI + Specifies who can contact the group owner Available values are: - * "ANYONE_CAN_CONTACT" * "ALL_IN_DOMAIN_CAN_CONTACT" - * "ALL_MEMBERS_CAN_CONTACT" * "ALL_MANAGERS_CAN_CONTACT" + * "ALL_MEMBERS_CAN_CONTACT" + * "ANYONE_CAN_CONTACT" + + .PARAMETER WhoCanDiscoverGroup + Specifies the set of users for whom this group is discoverable - .PARAMETER WhoCanInvite - Permissions to invite members. Available values are: - * "ALL_MEMBERS_CAN_INVITE" - * "ALL_MANAGERS_CAN_INVITE" - * "NONE_CAN_INVITE" + * "ANYONE_CAN_DISCOVER" + * "ALL_IN_DOMAIN_CAN_DISCOVER" -GApps Default + * "ALL_MEMBERS_CAN_DISCOVER" .PARAMETER WhoCanJoin - Permissions to join the group. + Permission to join group + Available values are: * "ANYONE_CAN_JOIN" * "ALL_IN_DOMAIN_CAN_JOIN" @@ -129,15 +129,37 @@ function Set-GSGroupSettings { * "CAN_REQUEST_TO_JOIN" .PARAMETER WhoCanLeaveGroup - Permission to leave the group. + Specifies who can leave the group Available values are: * "ALL_MANAGERS_CAN_LEAVE" - * "ALL_MEMBERS_CAN_LEAVE" + * "ALL_MEMBERS_CAN_LEAVE" -GApps Default * "NONE_CAN_LEAVE" + .PARAMETER WhoCanModerateContent + Specifies who can moderate content + Note: In March 2019, the whoCanModerateMembers, whoCanModerateContent, and whoCanAssistContent parent properties were + added to merge similar properties. + + Available values are: + * "ALL_MEMBERS" + * "OWNERS_AND_MANAGERS" -GApps Default + * "OWNERS_ONLY" + * "NONE" + + .PARAMETER WhoCanModerateMembers + Specifies who can manage members + Note: In March 2019, the whoCanModerateMembers, whoCanModerateContent, and whoCanAssistContent parent properties were + added to merge similar properties. + + Available values are: + * "ALL_MEMBERS" + * "OWNERS_AND_MANAGERS" + * "OWNERS_ONLY" -GApps Default + * "NONE" + .PARAMETER WhoCanPostMessage - Permissions to post messages to the group. + Permissions to post messages Available values are: * "NONE_CAN_POST" @@ -148,20 +170,21 @@ function Set-GSGroupSettings { * "ANYONE_CAN_POST" .PARAMETER WhoCanViewGroup - Permissions to view group. + Permissions to view group messages Available values are: * "ANYONE_CAN_VIEW" * "ALL_IN_DOMAIN_CAN_VIEW" - * "ALL_MEMBERS_CAN_VIEW" + * "ALL_MEMBERS_CAN_VIEW" -GApps Default * "ALL_MANAGERS_CAN_VIEW" + * "ALL_OWNERS_CAN_VIEW" .PARAMETER WhoCanViewMembership - Permissions to view membership. + Permissions to view membership Available values are: * "ALL_IN_DOMAIN_CAN_VIEW" - * "ALL_MEMBERS_CAN_VIEW" + * "ALL_MEMBERS_CAN_VIEW" -GApps Default * "ALL_MANAGERS_CAN_VIEW" .EXAMPLE @@ -173,112 +196,115 @@ function Set-GSGroupSettings { [cmdletbinding()] Param ( - [parameter(Mandatory = $true,Position = 0,ValueFromPipeline = $true,ValueFromPipelineByPropertyName = $true)] - [Alias('GroupEmail','Group')] - [String[]] - $Identity, - [parameter(Mandatory = $false)] - [String] - $Name, - [parameter(Mandatory = $false)] - [String] - $Description, - [parameter(Mandatory = $false)] - [Switch] - $ArchiveOnly, - [parameter(Mandatory = $false)] - [Switch] - $AllowExternalMembers, - [parameter(Mandatory = $false)] - [Switch] - $AllowGoogleCommunication, - [parameter(Mandatory = $false)] - [Switch] - $AllowWebPosting, - [parameter(Mandatory = $false)] - [ValidateScript( {$_.length -le 1000})] - [String] - $CustomFooterText, - [parameter(Mandatory = $false)] - [String] - $CustomReplyToAddress, - [parameter(Mandatory = $false)] - [Alias('MessageDenyNotificationText')] - [ValidateScript( {$_.length -le 10000})] - [String] - $DefaultMessageDenyNotificationText, - [parameter(Mandatory = $false)] - [String] - $Email, - [parameter(Mandatory = $false)] - [Switch] - $IncludeCustomFooter, - [parameter(Mandatory = $false)] - [Switch] - $IncludeInGlobalAddressList, - [parameter(Mandatory = $false)] - [Switch] - $IsArchived, - [parameter(Mandatory = $false)] - [int] - $MaxMessageBytes, - [parameter(Mandatory = $false)] - [Switch] - $MembersCanPostAsTheGroup, - [parameter(Mandatory = $false)] - [ValidateSet("DEFAULT_FONT","FIXED_WIDTH_FONT")] - [String] - $MessageDisplayFont, - [parameter(Mandatory = $false)] - [ValidateSet("MODERATE_ALL_MESSAGES","MODERATE_NEW_MEMBERS","MODERATE_NONE","MODERATE_NON_MEMBERS")] - [String] - $MessageModerationLevel, - [parameter(Mandatory = $false)] - [ValidateSet("REPLY_TO_CUSTOM","REPLY_TO_IGNORE","REPLY_TO_LIST","REPLY_TO_MANAGERS","REPLY_TO_OWNER","REPLY_TO_SENDER")] - [String] - $ReplyTo, - [parameter(Mandatory = $false)] - [Switch] - $SendMessageDenyNotification, - [parameter(Mandatory = $false)] - [Switch] - $ShowInGroupDirectory, - [parameter(Mandatory = $false)] - [ValidateSet("ALLOW","MODERATE","SILENTLY_MODERATE","REJECT")] - [String] - $SpamModerationLevel, - [parameter(Mandatory = $false)] - [ValidateSet("ALL_MEMBERS_CAN_ADD","ALL_MANAGERS_CAN_ADD","NONE_CAN_ADD")] - [String] - $WhoCanAdd, - [parameter(Mandatory = $false)] - [ValidateSet("ALL_IN_DOMAIN_CAN_CONTACT","ALL_MANAGERS_CAN_CONTACT","ALL_MEMBERS_CAN_CONTACT","ANYONE_CAN_CONTACT")] - [String] - $WhoCanContactOwner, - [parameter(Mandatory = $false)] - [ValidateSet("ALL_MANAGERS_CAN_INVITE","ALL_MEMBERS_CAN_INVITE","NONE_CAN_INVITE")] - [String] - $WhoCanInvite, - [parameter(Mandatory = $false)] - [ValidateSet("ALL_IN_DOMAIN_CAN_JOIN","ANYONE_CAN_JOIN","CAN_REQUEST_TO_JOIN","INVITED_CAN_JOIN")] - [String] - $WhoCanJoin, - [parameter(Mandatory = $false)] - [ValidateSet("ALL_MANAGERS_CAN_LEAVE","ALL_MEMBERS_CAN_LEAVE","NONE_CAN_LEAVE")] - [String] - $WhoCanLeaveGroup, - [parameter(Mandatory = $false)] - [ValidateSet("ALL_IN_DOMAIN_CAN_POST","ALL_MANAGERS_CAN_POST","ALL_MEMBERS_CAN_POST","ANYONE_CAN_POST","NONE_CAN_POST")] - [String] - $WhoCanPostMessage, - [parameter(Mandatory = $false)] - [ValidateSet("ALL_IN_DOMAIN_CAN_VIEW","ALL_MANAGERS_CAN_VIEW","ALL_MEMBERS_CAN_VIEW","ANYONE_CAN_VIEW")] - [String] - $WhoCanViewGroup, - [parameter(Mandatory = $false)] - [ValidateSet("ALL_IN_DOMAIN_CAN_VIEW","ALL_MANAGERS_CAN_VIEW","ALL_MEMBERS_CAN_VIEW")] - [String] - $WhoCanViewMembership + [parameter(Mandatory = $true,Position = 0,ValueFromPipeline = $true,ValueFromPipelineByPropertyName = $true)] + [Alias('GroupEmail','Group')] + [String[]] + $Identity, + [parameter(Mandatory = $false)] + [ValidateScript( {$_.length -le 75})] + [String] + $Name, + [parameter(Mandatory = $false)] + [ValidateScript( {$_.length -le 300})] + [String] + $Description, + [parameter(Mandatory = $false)] + [Switch] + $AllowExternalMembers, + [parameter(Mandatory = $false)] + [Switch] + $AllowWebPosting, + [parameter(Mandatory = $false)] + [Switch] + $ArchiveOnly, + [parameter(Mandatory = $false)] + [ValidateScript( {$_.length -le 1000})] + [String] + $CustomFooterText, + [parameter(Mandatory = $false)] + [String] + $CustomReplyTo, + [parameter(Mandatory = $false)] + [Alias('MessageDenyNotificationText')] + [ValidateScript( {$_.length -le 10000})] + [String] + $DefaultMessageDenyNotificationText, + [parameter(Mandatory = $false)] + [Switch] + $EnableCollaborativeInbox, + [parameter(Mandatory = $false)] + [Switch] + $FavoriteRepliesOnTop, + [parameter(Mandatory = $false)] + [Switch] + $IncludeCustomFooter, + [parameter(Mandatory = $false)] + [Switch] + $IncludeInGlobalAddressList, + [parameter(Mandatory = $false)] + [Switch] + $IsArchived, + [parameter(Mandatory = $false)] + [Switch] + $MembersCanPostAsTheGroup, + [parameter(Mandatory = $false)] + [ValidateSet("MODERATE_ALL_MESSAGES","MODERATE_NEW_MEMBERS","MODERATE_NONE","MODERATE_NON_MEMBERS")] + [String] + $MessageModerationLevel, + [ValidateScript( {$_.length -le 5})] + [String] + $PrimaryLanguage, + [parameter(Mandatory = $false)] + [ValidateSet("REPLY_TO_CUSTOM","REPLY_TO_IGNORE","REPLY_TO_LIST","REPLY_TO_MANAGERS","REPLY_TO_OWNER","REPLY_TO_SENDER")] + [String] + $ReplyTo, + [parameter(Mandatory = $false)] + [Switch] + $SendMessageDenyNotification, + [parameter(Mandatory = $false)] + [ValidateSet("ALLOW","MODERATE","SILENTLY_MODERATE","REJECT")] + [String] + $SpamModerationLevel, + [parameter(Mandatory = $false)] + [ValidateSet("ALL_MEMBERS","OWNERS_AND_MANAGERS","MANAGERS_ONLY","OWNERS_ONLY","NONE")] + [String] + $WhoCanAssistContent, + [parameter(Mandatory = $false)] + [ValidateSet("ALL_IN_DOMAIN_CAN_CONTACT","ALL_MANAGERS_CAN_CONTACT","ALL_MEMBERS_CAN_CONTACT","ANYONE_CAN_CONTACT")] + [String] + $WhoCanContactOwner, + [parameter(Mandatory = $false)] + [ValidateSet("ANYONE_CAN_DISCOVER","ALL_IN_DOMAIN_CAN_DISCOVER","ALL_MEMBERS_CAN_DISCOVER")] + [String] + $WhoCanDiscoverGroup, + [parameter(Mandatory = $false)] + [ValidateSet("ALL_IN_DOMAIN_CAN_JOIN","ANYONE_CAN_JOIN","CAN_REQUEST_TO_JOIN","INVITED_CAN_JOIN")] + [String] + $WhoCanJoin, + [parameter(Mandatory = $false)] + [ValidateSet("ALL_MANAGERS_CAN_LEAVE","ALL_MEMBERS_CAN_LEAVE","NONE_CAN_LEAVE")] + [String] + $WhoCanLeaveGroup, + [parameter(Mandatory = $false)] + [ValidateSet("ALL_MEMBERS","OWNERS_AND_MANAGERS","OWNERS_ONLY","NONE")] + [String] + $WhoCanModerateContent, + [parameter(Mandatory = $false)] + [ValidateSet("ALL_MEMBERS","OWNERS_AND_MANAGERS","OWNERS_ONLY","NONE")] + [String] + $WhoCanModerateMembers, + [parameter(Mandatory = $false)] + [ValidateSet("NONE_CAN_POST","ALL_MANAGERS_CAN_POST","ALL_MEMBERS_CAN_POST","ALL_OWNERS_CAN_POST","ALL_IN_DOMAIN_CAN_POST","ANYONE_CAN_POST")] + [String] + $WhoCanPostMessage, + [parameter(Mandatory = $false)] + [ValidateSet("ANYONE_CAN_VIEW","ALL_IN_DOMAIN_CAN_VIEW","ALL_MEMBERS_CAN_VIEW","ALL_MANAGERS_CAN_VIEW","ALL_OWNERS_CAN_VIEW")] + [String] + $WhoCanViewGroup, + [parameter(Mandatory = $false)] + [ValidateSet("ALL_IN_DOMAIN_CAN_VIEW","ALL_MANAGERS_CAN_VIEW","ALL_MEMBERS_CAN_VIEW")] + [String] + $WhoCanViewMembership ) Begin { $serviceParams = @{ From 43e78a34cb4a7b4313a51064368c1d28cc704d6f Mon Sep 17 00:00:00 2001 From: gsa-hub <73730730+gsa-hub@users.noreply.github.com> Date: Sun, 1 Nov 2020 08:59:34 -0500 Subject: [PATCH 2/3] didn't read the contribution guide Little clean up, I didn't read the contribution guide till now. --- PSGSuite/Public/Groups/Set-GSGroupSettings.ps1 | 3 --- 1 file changed, 3 deletions(-) diff --git a/PSGSuite/Public/Groups/Set-GSGroupSettings.ps1 b/PSGSuite/Public/Groups/Set-GSGroupSettings.ps1 index f11078f2..699f2c53 100644 --- a/PSGSuite/Public/Groups/Set-GSGroupSettings.ps1 +++ b/PSGSuite/Public/Groups/Set-GSGroupSettings.ps1 @@ -6,9 +6,6 @@ function Set-GSGroupSettings { .DESCRIPTION Hard-sets the settings for a group - Reference: - https://developers.google.com/admin-sdk/groups-settings/v1/reference/groups - .PARAMETER Identity The primary email or unique Id of the group to set From 690ba8da866988f932b2dacf952a0ff1a976ec37 Mon Sep 17 00:00:00 2001 From: gsa-hub <73730730+gsa-hub@users.noreply.github.com> Date: Sun, 1 Nov 2020 09:23:47 -0500 Subject: [PATCH 3/3] 2.36.5 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ea0793f..435e7097 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ * [PSGSuite - ChangeLog](#psgsuite---changelog) + * [2.36.5 - 2020-11-01](#2365---2020-11-01) * [2.36.4 - 2020-03-20](#2364---2020-03-20) * [2.36.3 - 2020-03-20](#2363---2020-03-20) * [2.36.2 - 2020-03-02](#2362---2020-03-02) @@ -111,6 +112,11 @@ # PSGSuite - ChangeLog +## 2.36.5 - 2020-11-01 + +* [Issue #331](https://github.com/scrthq/PSGSuite/issues/331) + * Updated many inaccurate parameters in `Set-GSGroupSettings.ps1` due to Google Group changes upstream + ## 2.36.4 - 2020-03-20 * [Issue #270](https://github.com/scrthq/PSGSuite/issues/270)