Commands › Exchange Online

Get-UserPrincipalNamesSuffix

Exchange Online ExchangeOnlineManagement Get-*

View the user principal name (UPN) suffixes in the Active Directory forest. The UPN suffixes are created in Active Directory Domains and Trusts.

Quick start script

# Get-UserPrincipalNamesSuffix — 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
Get-UserPrincipalNamesSuffix | Format-List

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

Syntax

Get-UserPrincipalNamesSuffix [-OrganizationalUnit <ExtendedOrganizationalUnitIdParameter>]
 [<CommonParameters>]

Parameters (1)

ParameterTypeRequiredWhat it controls
-OrganizationalUnit ExtendedOrganizationalUnitIdParameter The OrganizationalUnit parameter filters the results based on the object's location in Active Directory. Only objects that exist in the specified location are returned. Valid input for this parameter is an...

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