Commands › Exchange Online

Add-UnifiedGroupLinks

Exchange Online ExchangeOnlineManagement Add-*

Add members, owners and subscribers to Microsoft 365 Groups in your cloud-based organization. To remove members, owners, and subscribers, use the Remove-UnifiedGroupLinks cmdlet. To modify other properties of Microsoft 365 Groups, use the Set-UnifiedGroup cmdlet. > [!NOTE] > You can't use this cmdlet to modify Microsoft 365 Group members, owners, or subscribers if you connect using certificate based authentication (also known as CBA or app-only authentication for unattended scripts) or Azure managed identity. You can use Microsoft Graph instead. For more information, see Group resource type. >

Quick start script

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

# 2. Run and inspect
Add-UnifiedGroupLinks -Identity <UnifiedGroupIdParameter> -Links <RecipientIdParameter[]> -LinkType <LinkType> | Format-List

# 3. Export for evidence / drift tracking
Add-UnifiedGroupLinks | Export-Clixml .\UnifiedGroupLinks-$(Get-Date -Format yyyyMMdd).xml

Syntax

Add-UnifiedGroupLinks [-Identity] <UnifiedGroupIdParameter> -Links <RecipientIdParameter[]> -LinkType <LinkType>
 [-Confirm]
 [-WhatIf]
 [<CommonParameters>]

Parameters (5)

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:
-Links RecipientIdParameter[] yes The Links parameter specifies the recipients to add to the Microsoft 365 Group. You specify whether these recipients are members, owners, or subscribers by using the LinkType parameter.
-LinkType LinkType yes The LinkType parameter specifies the recipient's role in the Microsoft 365 Group that you want to add. Valid values are:
-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.
-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.