Skip to content

Get-MSTTeamTargetingHierarchyStatus

Teams: Get team targeting hierarchy status

#Requires -Version 5.1

[CmdletBinding()]
Param(
    [string]$RequestID
)

Process {
    try {
        [hashtable]$cmdArgs = @{'ErrorAction' = 'Stop'}

        if (-not [System.String]::IsNullOrWhiteSpace($RequestID)) {
            $cmdArgs.Add('RequestID', $RequestID)
        }

        $result = Get-TeamTargetingHierarchyStatus @cmdArgs | Select-Object *

        if ($null -eq $result) {
            Write-Output "No targeting hierarchy status found"
            return
        }
        $result | Add-Member -NotePropertyName Timestamp -NotePropertyValue (Get-Date -Format 'yyyy-MM-dd HH:mm:ss') -PassThru -Force
    }
    catch { throw }
}

Optional request ID to check a specific targeting hierarchy operation

An interactive directory of PowerShell scripts.