Commands › Microsoft Teams
Set-TeamTargetingHierarchy
Upload a hierarchy to the tenant. A tenant may only have 1 active hierarchy. Each Set-TeamTargetingHierarchy cmdlet call will overwrite the previous one.
Quick start script
# Set-TeamTargetingHierarchy — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-MicrosoftTeams -CertificateThumbprint $thumb -ApplicationId $appId -TenantId $tenantId
# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-TeamTargetingHierarchy
$before | Format-List
# 3. Make the change
Set-TeamTargetingHierarchy -FilePath <String>
# 4. Verify and diff
$after = Get-TeamTargetingHierarchy
Compare-Object ($before | Out-String) ($after | Out-String)
Syntax
Set-TeamTargetingHierarchyStatus [-FilePath <String>] [-ApiVersion <String>] [<CommonParameters>]
Parameters (2)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.