Commands › Exchange Online

Set-Group

Exchange Online ExchangeOnlineManagement Set-*

Modify group object settings. If the group is a mail-enabled security group or a distribution group, you can use the Set-DistributionGroup cmdlet to modify other Microsoft Exchange settings that aren't available by using the Set-Group cmdlet.

Quick start script

# Set-Group — 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-Group
$before | Format-List

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

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

Syntax

Set-Group [-Identity] <GroupIdParameter>
 [-BypassSecurityGroupManagerCheck]
 [-Confirm]
 [-Description <MultiValueProperty>]
 [-DisplayName <String>]
 [-DomainController <Fqdn>]
 [-IgnoreDefaultScope]
 [-IsHierarchicalGroup <Boolean>]
 [-ManagedBy <GeneralRecipientIdParameter[]>]
 [-Name <String>]
 [-Notes <String>]
 [-PhoneticDisplayName <String>]
 [-SeniorityIndex <Int32>]
 [-SimpleDisplayName <String>]
 [-Universal]
 [-WhatIf]
 [-WindowsEmailAddress <SmtpAddress>]
 [<CommonParameters>]

Parameters (17)

ParameterTypeRequiredWhat it controls
-Identity GroupIdParameter yes The Identity parameter specifies the group that you want to modify. You can use any value that uniquely identifies the group. For example:
-BypassSecurityGroupManagerCheck SwitchParameter The BypassSecurityGroupManagerCheck switch specifies whether to allow a user who isn't an owner of the group to modify or delete the group. You don't need to specify a value with this switch.
-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.
-Description MultiValuedProperty This parameter is available only in the cloud-based service.
-DisplayName String The DisplayName parameter specifies the display name of the group. The display name is visible in the Exchange admin center and in address lists. The maximum length is 256 characters. If the value contains spaces,...
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-IgnoreDefaultScope SwitchParameter This parameter is available only in on-premises Exchange.
-IsHierarchicalGroup Boolean The IsHierarchicalGroup parameter specifies whether the group is part of a hierarchical address book. Valid values are $true or $false. The default value is $false.
-ManagedBy GeneralRecipientIdParameter[] The ManagedBy parameter specifies an owner for the group. A group must have at least one owner. If you don't use this parameter to specify the owner when you create the group, the user account that created the group...
-Name String The Name parameter specifies the unique name of the group. The maximum length is 64 characters. If the value contains spaces, enclose the value in quotation marks (").
-Notes String The Notes parameters specifies additional information about the object. If the value contains spaces, enclose the value in quotation marks (").
-PhoneticDisplayName String The PhoneticDisplayName parameter specifies an alternate spelling of the user's name that's used for text to speech in Unified Messaging (UM) environments. Typically, you use this parameter when the pronunciation and...
-SeniorityIndex Int32 The SeniorityIndex parameter specifies the order in which this group displays in a hierarchical address book. A group with a value of 2 displays higher in an address book than a group with a value of 1.
-SimpleDisplayName String The SimpleDisplayName parameter is used to display an alternative description of the object when only a limited set of characters is permitted. Valid characters are:
-Universal SwitchParameter The Universal switch changes the scope of the group from Global or DomainLocal to Universal. You don't need to specify a value with this switch.
-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.
-WindowsEmailAddress SmtpAddress The WindowsEmailAddress parameter specifies the Windows email address for this recipient. This is a common Active Directory attribute that's present in all environments, including environments without Exchange. Using...

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