Commands › Exchange Online

Set-OnPremisesOrganization

Exchange Online ExchangeOnlineManagement Set-*

Modify the parameters of the OnPremisesOrganization object on the Microsoft 365 tenant.

Quick start script

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

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

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

Syntax

Set-OnPremisesOrganization [-Identity] <OnPremisesOrganizationIdParameter>
 [-Comment <String>]
 [-Confirm]
 [-HybridDomains <MultiValuedProperty>]
 [-InboundConnector <InboundConnectorIdParameter>]
 [-OrganizationName <String>]
 [-OrganizationRelationship <OrganizationRelationshipIdParameter>]
 [-OutboundConnector <OutboundConnectorIdParameter>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (9)

ParameterTypeRequiredWhat it controls
-Identity OnPremisesOrganizationIdParameter yes The Identity parameter specifies the identity of the on-premises organization object. You can use the following values:
-Comment String The Comment parameter specifies an optional comment. If you specify a value that contains spaces, enclose the value in quotation marks ("), for example: "This is an admin note".
-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.
-HybridDomains MultiValuedProperty The HybridDomains parameter specifies the domains that are configured in the hybrid deployment between a Microsoft 365 organization and an on-premises Exchange organization. The domains specified in this parameter...
-InboundConnector InboundConnectorIdParameter The InboundConnector parameter specifies the name of the inbound connector configured in Microsoft 365 for a hybrid deployment configured with an on-premises Exchange organization.
-OrganizationName String The OrganizationName parameter specifies the Active Directory object name of the on-premises Exchange organization.
-OrganizationRelationship OrganizationRelationshipIdParameter The OrganizationRelationship parameter specifies the organization relationship configured by the Hybrid Configuration wizard on the Microsoft 365 organization as part of a hybrid deployment with an on-premises...
-OutboundConnector OutboundConnectorIdParameter The OutboundConnector parameter specifies the name of the outbound connector configured in Microsoft 365 for a hybrid deployment with an on-premises Exchange 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.