Skip to content

Remove-MSTTeamTargetingHierarchy

Teams: Remove team targeting hierarchy

#Requires -Version 5.1

[CmdletBinding()]
Param()

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

        $result = Remove-TeamTargetingHierarchy @getArgs

        [PSCustomObject]@{
            Timestamp = Get-Date -Format 'yyyy-MM-dd HH:mm:ss'
            Status    = if ($null -eq $result) { 'Team targeting hierarchy removed' } else { $result.ToString() }
        }
    }
    catch { throw }
}

This script has no configurable parameters.

An interactive directory of PowerShell scripts.