Commands › Exchange Online

New-OrganizationRelationship

Exchange Online ExchangeOnlineManagement New-*

Create 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

# New-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)
New-OrganizationRelationship -Name <String> -DomainNames <MultiValuedProperty> -WhatIf
New-OrganizationRelationship -Name <String> -DomainNames <MultiValuedProperty>

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

Syntax

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

Parameters (24)

ParameterTypeRequiredWhat it controls
-Name String yes The Name parameter specifies the unique name of the organization relationship. The maximum length is 64 characters.
-DomainNames MultiValuedProperty yes 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"), limited to 238 domains...
-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.
-Enabled Boolean The Enabled parameter specifies whether to enable the organization relationship. Valid values are:
-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 an internal mail-enabled security group where member free/busy information is accessible by the external organization. For best performance, the group should have less than...
-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 that's 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 free/busy information is accessible by an external organization. You can use any value...
-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...
-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 defined in the organization relationship. It's used for Outlook on the web redirection in a...
-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.