Commands › Exchange Online

Set-OrganizationRelationship

Exchange Online ExchangeOnlineManagement Set-*

Modify existing organization relationships. Organization relationships define the settings that are used with external Exchange organizations to access calendar free/busy information or to move mailboxes between on-premises Exchange servers and Exchange Online as part of hybrid deployments.

Quick start script

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

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

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

Syntax

Set-OrganizationRelationship [-Identity] <OrganizationRelationshipIdParameter>
 [-ArchiveAccessEnabled <Boolean>]
 [-Confirm]
 [-DeliveryReportEnabled <Boolean>]
 [-DomainController <Fqdn>]
 [-DomainNames <MultiValuedProperty>]
 [-Enabled <Boolean>]
 [-Force]
 [-FreeBusyAccessEnabled <Boolean>]
 [-FreeBusyAccessLevel <FreeBusyAccessLevel>]
 [-FreeBusyAccessScope <GroupIdParameter>]
 [-MailboxMoveCapability <MailboxMoveCapability>]
 [-MailboxMoveEnabled <Boolean>]
 [-MailboxMovePublishedScopes <MultiValuedProperty>]
 [-MailTipsAccessEnabled <Boolean>]
 [-MailTipsAccessLevel <MailTipsAccessLevel>]
 [-MailTipsAccessScope <GroupIdParameter>]
 [-Name <String>]
 [-OAuthApplicationId <String>]
 [-OrganizationContact <SmtpAddress>]
 [-PhotosEnabled <Boolean>]
 [-TargetApplicationUri <Uri>]
 [-TargetAutodiscoverEpr <Uri>]
 [-TargetOwaURL <Uri>]
 [-TargetSharingEpr <Uri>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (26)

ParameterTypeRequiredWhat it controls
-Identity OrganizationRelationshipIdParameter yes The Identity parameter specifies the organization relationship that you want to modify. You can use any value that uniquely identifies the organization relationship. For example:
-ArchiveAccessEnabled Boolean The ArchiveAccessEnabled parameter specifies whether the organization relationship is configured to provide remote archive access. 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.
-DeliveryReportEnabled Boolean The DeliveryReportEnabled parameter specifies whether Delivery Reports should be shared over the organization relationship. Valid values are:
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-DomainNames MultiValuedProperty The DomainNames parameter specifies the SMTP domains of the external organization. You can specify multiple domains separated by commas (for example, "contoso.com","northamerica.contoso.com").
-Enabled Boolean The Enabled parameter specifies whether to enable the organization relationship. Valid values are:
-Force SwitchParameter The Force switch hides warning or confirmation messages. You don't need to specify a value with this switch.
-FreeBusyAccessEnabled Boolean The FreeBusyAccessEnabled parameter specifies whether the organization relationship should be used to retrieve free/busy information from the external organization. Valid values are:
-FreeBusyAccessLevel FreeBusyAccessLevel The FreeBusyAccessLevel parameter specifies the maximum amount of detail returned to the requesting organization. Valid values are:
-FreeBusyAccessScope GroupIdParameter The FreeBusyAccessScope parameter specifies a mail-enabled security group in the internal organization that contains users whose free/busy information is accessible by an external organization. You can use any value...
-MailboxMoveCapability MailboxMoveCapability This parameter is available only in the cloud-based service.
-MailboxMoveEnabled Boolean The MailboxMoveEnabled parameter specifies whether the organization relationship enables moving mailboxes to or from the external organization. Valid values are:
-MailboxMovePublishedScopes MultiValuedProperty This parameter is available only in the cloud-based service.
-MailTipsAccessEnabled Boolean The MailTipsAccessEnabled parameter specifies whether MailTips for users in this organization are returned over this organization relationship. Valid values are:
-MailTipsAccessLevel MailTipsAccessLevel The MailTipsAccessLevel parameter specifies the level of MailTips data externally shared over this organization relationship. This parameter can have the following values:
-MailTipsAccessScope GroupIdParameter The MailTipsAccessScope parameter specifies a mail-enabled security group in the internal organization that contains users whose MailTips information is accessible by an external organization. You can use any value...
-Name String The Name parameter specifies the unique name of the organization relationship. The maximum length is 64 characters.
-OAuthApplicationId String This parameter is available only in the cloud-based service.
-OrganizationContact SmtpAddress The OrganizationContact parameter specifies the email address that can be used to contact the external organization (for example, administrator@fourthcoffee.com).
-PhotosEnabled Boolean The PhotosEnabled parameter specifies whether photos for users in the internal organization are returned over the organization relationship. Valid values are:
-TargetApplicationUri Uri The TargetApplicationUri parameter specifies the target Uniform Resource Identifier (URI) of the external organization. The TargetApplicationUri parameter is specified by Exchange when requesting a delegated token to...
-TargetAutodiscoverEpr Uri The TargetAutodiscoverEpr parameter specifies the Autodiscover URL of Exchange Web Services for the external organization, for example, `https://contoso.com/autodiscover/autodiscover.svc/wssecurity`. Exchange uses...
-TargetOwaURL Uri The TargetOwaURL parameter specifies the Outlook on the web (formerly Outlook Web App) URL of the external organization that's defined in the organization relationship. It is used for Outlook on the web redirection...
-TargetSharingEpr Uri The TargetSharingEpr parameter specifies the URL of the target Exchange Web Services for the external organization.
-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.