Commands › Exchange Online

Set-UnifiedGroup

Exchange Online ExchangeOnlineManagement Set-*

Modify Microsoft 365 Groups in your cloud-based organization. To modify members, owners, and subscribers of Microsoft 365 Groups, use the Add-UnifiedGroupLinks and Remove-UnifiedGroupLinks cmdlets. **Important**: You can't use this cmdlet to remove all Microsoft Online Email Routing Address (MOERA) addresses from the Microsoft 365 Group. There must be at least one MOERA address attached to a group. To learn more about MOERA addresses, see How the proxyAddresses attribute is populated in Microsoft Entra ID.

Quick start script

# Set-UnifiedGroup — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-UnifiedGroup
$before | Format-List

# 3. Make the change (dry run first)
Set-UnifiedGroup -Identity <UnifiedGroupIdParameter> -WhatIf
Set-UnifiedGroup -Identity <UnifiedGroupIdParameter>

# 4. Verify and diff
$after = Get-UnifiedGroup
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

Set-UnifiedGroup [-Identity] <UnifiedGroupIdParameter>
 [-AcceptMessagesOnlyFromSendersOrMembers <MultiValuedProperty>]
 [-AccessType <ModernGroupTypeInfo>]
 [-Alias <String>]
 [-AlwaysSubscribeMembersToCalendarEvents]
 [-AuditLogAgeLimit <EnhancedTimeSpan>]
 [-AutoSubscribeNewMembers]
 [-CalendarMemberReadOnly]
 [-Classification <String>]
 [-Confirm]
 [-ConnectorsEnabled]
 [-CustomAttribute1 <String>]
 [-CustomAttribute10 <String>]
 [-CustomAttribute11 <String>]
 [-CustomAttribute12 <String>]
 [-CustomAttribute13 <String>]
 [-CustomAttribute14 <String>]
 [-CustomAttribute15 <String>]
 [-CustomAttribute2 <String>]
 [-CustomAttribute3 <String>]
 [-CustomAttribute4 <String>]
 [-CustomAttribute5 <String>]
 [-CustomAttribute6 <String>]
 [-CustomAttribute7 <String>]
 [-CustomAttribute8 <String>]
 [-CustomAttribute9 <String>]
 [-DataEncryptionPolicy <DataEncryptionPolicyIdParameter>]
 [-DisplayName <String>]
 [-EmailAddresses <ProxyAddressCollection>]
 [-ExtensionCustomAttribute1 <MultiValuedProperty>]
 [-ExtensionCustomAttribute2 <MultiValuedProperty>]
 [-ExtensionCustomAttribute3 <MultiValuedProperty>]
 [-ExtensionCustomAttribute4 <MultiValuedProperty>]
 [-ExtensionCustomAttribute5 <MultiValuedProperty>]
 [-ForceUpgrade]
 [-GrantSendOnBehalfTo <MultiValuedProperty>]
 [-HiddenFromAddressListsEnabled <Boolean>]
 [-HiddenFromExchangeClientsEnabled]
 [-InformationBarrierMode <GroupInformationBarrierMode>]
 [-IsMemberAllowedToEditContent <System.Boolean>]
 [-Language <CultureInfo>]
 [-MailboxRegion <String>]
 [-MailTip <String>]
 [-MailTipTranslations <MultiValuedProperty>]
 [-MaxReceiveSize <Unlimited>]
 [-MaxSendSize <Unlimited>]
 [-ModeratedBy <MultiValuedProperty>]
 [-ModerationEnabled <Boolean>]
 [-Notes <String>]
 [-PrimarySmtpAddress <SmtpAddress>]
 [-RejectMessagesFromSendersOrMembers <MultiValuedProperty>]
 [-RequireSenderAuthenticationEnabled <Boolean>]
 [-SensitivityLabelId <Sustem.Guid>]
 [-SubscriptionEnabled]
 [-UnifiedGroupWelcomeMessageEnabled]
 [-WhatIf]
 [<CommonParameters>]

Parameters (56)

ParameterTypeRequiredWhat it controls
-Identity UnifiedGroupIdParameter yes The Identity parameter specifies the Microsoft 365 Group that you want to modify. You can use any value that uniquely identifies the Microsoft 365 Group. For example:
-AcceptMessagesOnlyFromSendersOrMembers MultiValuedProperty The AcceptMessagesOnlyFromSendersOrMembers parameter specifies who is allowed to send messages to this recipient. Messages from other senders are rejected.
-AccessType ModernGroupTypeInfo The AccessType parameter specifies the privacy type for the Microsoft 365 Group. Valid values are:
-Alias String The Alias parameter specifies the Exchange alias (also known as the mail nickname) for the Microsoft 365 Group. This value identifies the recipient as a mail-enabled object, and shouldn't be confused with multiple...
-AlwaysSubscribeMembersToCalendarEvents SwitchParameter The AlwaysSubscribeMembersToCalendarEvents switch controls the default subscription settings of new members that are added to the Microsoft 365 Group. Changing this setting doesn't affect existing group members.
-AuditLogAgeLimit EnhancedTimeSpan The AuditLogAgeLimit parameter specifies the maximum age of audit log entries for the Microsoft 365 Group. Log entries older than the specified value are removed. The default value is 90 days.
-AutoSubscribeNewMembers SwitchParameter The AutoSubscribeNewMembers switch specifies whether to automatically subscribe new members that are added to the Microsoft 365 Group to conversations and calendar events. Only users that are added to the group after...
-CalendarMemberReadOnly SwitchParameter The CalendarMemberReadOnly switch specifies whether to set read-only Calendar permissions to the Microsoft 365 Group for members of the group.
-Classification String The Classification parameter specifies the classification for the Microsoft 365 Group. You need to configure the list of available classifications in Microsoft Entra ID before you can specify a value for this...
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-ConnectorsEnabled SwitchParameter The ConnectorsEnabled specifies whether to enable the ability to use connectors for the Microsoft 365 Group.
-CustomAttribute1 String This parameter specifies a value for the CustomAttribute1 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute10 String This parameter specifies a value for the CustomAttribute10 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute11 String This parameter specifies a value for the CustomAttribute11 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute12 String This parameter specifies a value for the CustomAttribute12 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute13 String This parameter specifies a value for the CustomAttribute13 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute14 String This parameter specifies a value for the CustomAttribute14 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute15 String This parameter specifies a value for the CustomAttribute15 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute2 String This parameter specifies a value for the CustomAttribute2 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute3 String This parameter specifies a value for the CustomAttribute3 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute4 String This parameter specifies a value for the CustomAttribute4 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute5 String This parameter specifies a value for the CustomAttribute5 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute6 String This parameter specifies a value for the CustomAttribute6 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute7 String This parameter specifies a value for the CustomAttribute7 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute8 String This parameter specifies a value for the CustomAttribute8 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute9 String This parameter specifies a value for the CustomAttribute9 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-DataEncryptionPolicy DataEncryptionPolicyIdParameter The DataEncryptionPolicy parameter specifies the data encryption policy that's applied to the Microsoft 365 Group. You can use any value that uniquely identifies the policy. For example:
-DisplayName String The DisplayName parameter specifies the name of the Microsoft 365 Group. The display name is visible in the Exchange admin center, address lists, and Outlook. The maximum length is 64 characters. If the value...
-EmailAddresses ProxyAddressCollection The EmailAddresses parameter specifies all email addresses (proxy addresses) for the Microsoft 365 Group, including the primary SMTP address. In cloud-based organizations, the primary SMTP address and other proxy...
-ExtensionCustomAttribute1 MultiValuedProperty This parameter specifies a value for the ExtensionCustomAttribute1 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. You...
-ExtensionCustomAttribute2 MultiValuedProperty This parameter specifies a value for the ExtensionCustomAttribute2 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. You...
-ExtensionCustomAttribute3 MultiValuedProperty This parameter specifies a value for the ExtensionCustomAttribute3 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. You...
-ExtensionCustomAttribute4 MultiValuedProperty This parameter specifies a value for the ExtensionCustomAttribute4 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. You...
-ExtensionCustomAttribute5 MultiValuedProperty This parameter specifies a value for the ExtensionCustomAttribute5 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. You...
-ForceUpgrade SwitchParameter The ForceUpgrade switch suppresses the confirmation message that appears if the object was created in a previous version of Exchange. You don't need to specify a value with this switch.
-GrantSendOnBehalfTo MultiValuedProperty The GrantSendOnBehalfTo parameter specifies who can send on behalf of this Microsoft 365 Group. Although messages that are sent on behalf of the group clearly show the sender in the From field (`<Sender> on behalf of...
-HiddenFromAddressListsEnabled Boolean The HiddenFromAddressListsEnabled parameter specifies whether the Microsoft 365 Group appears in the global address list (GAL) and other address lists in your organization. Valid values are:
-HiddenFromExchangeClientsEnabled SwitchParameter The HiddenFromExchangeClientsEnabled switch specifies whether the Microsoft 365 Group is hidden from Outlook clients connected to Microsoft 365.
-InformationBarrierMode GroupInformationBarrierMode The InformationBarrierMode parameter specifies the information barrier mode for the Microsoft 365 Group. Valid values are:
-IsMemberAllowedToEditContent Boolean {{ Fill IsMemberAllowedToEditContent Description }}
-Language CultureInfo The Language parameter specifies language preference for the Microsoft 365 Group.
-MailboxRegion String The MailboxRegion parameter specifies the preferred data location (PDL) for the Microsoft 365 Group in multi-geo environments.
-MailTip String The MailTip parameter specifies the custom MailTip text for this recipient. The MailTip is shown to senders when they start drafting an email message to this recipient. If the value contains spaces, enclose the value...
-MailTipTranslations MultiValuedProperty The MailTipTranslations parameter specifies additional languages for the custom MailTip text that's defined by the MailTip parameter. HTML tags are automatically added to the MailTip translation, additional HTML tags...
-MaxReceiveSize Unlimited The MaxReceiveSize parameter specifies the maximum size of an email message that can be sent to this group. Messages that exceed the maximum size are rejected by the group.
-MaxSendSize Unlimited The MaxSendSize parameter specifies the maximum size of an email message that can be sent by this group.
-ModeratedBy MultiValuedProperty The ModeratedBy parameter specifies one or more moderators for this recipient. A moderator approves messages sent to the recipient before the messages are delivered. A moderator must be a mailbox, mail user, or mail...
-ModerationEnabled Boolean The ModerationEnabled parameter specifies whether moderation is enabled for this recipient. Valid value are:
-Notes String The Notes parameter specifies the description of the Microsoft 365 Group. If the value contains spaces, enclose the value in quotation marks.
-PrimarySmtpAddress SmtpAddress The PrimarySmtpAddress parameter specifies the primary return email address that's used for the recipient. You can't use the EmailAddresses and PrimarySmtpAddress parameters in the same command.
-RejectMessagesFromSendersOrMembers MultiValuedProperty The RejectMessagesFromSendersOrMembers parameter specifies who isn't allowed to send messages to this recipient. Messages from these senders are rejected.
-RequireSenderAuthenticationEnabled Boolean The RequireSenderAuthenticationEnabled parameter specifies whether to accept messages only from authenticated (internal) senders. Valid values are:
-SensitivityLabelId Guid The SensitivityLabelId parameter specifies the GUID value of the sensitivity label that's assigned to the Microsoft 365 Group.
-SubscriptionEnabled SwitchParameter The SubscriptionEnabled switch specifies whether the group owners can enable subscription to conversations and calendar events on the groups they own. This option can be set only in Exchange Online PowerShell.
-UnifiedGroupWelcomeMessageEnabled SwitchParameter The UnifiedGroupWelcomeMessageEnabled switch specifies whether to enable or disable sending system-generated welcome messages to users who are added as members to the Microsoft 365 Group.
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.