Commands › Microsoft Teams

Get-CsOnlineDirectoryTenant

Microsoft Teams MicrosoftTeams Get-*

Retrieve a tenant and associated parameters from the Business Voice Directory.

Quick start script

# Get-CsOnlineDirectoryTenant — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-MicrosoftTeams -CertificateThumbprint $thumb -ApplicationId $appId -TenantId $tenantId

# 2. Run and inspect
Get-CsOnlineDirectoryTenant | Format-List

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

Syntax

Get-CsOnlineDirectoryTenant [[-Tenant] <Guid>] [-DomainController <Fqdn>] [-Force] [-WhatIf] [-Confirm]
 [<CommonParameters>]

Parameters (5)

ParameterTypeRequiredWhat it controls
-Confirm SwitchParameter The Confirm switch causes the command to pause processing, and requires confirmation to proceed.
-DomainController Fqdn Specifies the domain controller that's used by the cmdlet to read or write the specified data. Valid inputs for this parameter are either the fully qualified domain name (FQDN) or the computer name.
-Force SwitchParameter The Force switch specifies whether to suppress warning and confirmation messages. It can be useful in scripting to suppress interactive prompts. If the Force switch isn't provided in the command, you're prompted for...
-Tenant Guid Specifies the globally unique identifier (GUID) of your Skype for Business Online tenant account. For example:
-WhatIf SwitchParameter The WhatIf switch causes the command to simulate its results. By using this switch, you can view what changes would occur without having to commit those changes.

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