Set-MSTTeamTargetingHierarchy
Teams: Set team targeting hierarchy
#Requires -Version 5.1
[CmdletBinding()]
Param(
[Parameter(Mandatory = $true)]
[string]$FilePath
)
Process {
try {
[hashtable]$getArgs = @{'ErrorAction' = 'Stop'; 'FilePath' = $FilePath}
$result = Set-TeamTargetingHierarchy @getArgs | Select-Object *
if ($null -eq $result) {
Write-Output "Team targeting hierarchy set"
return
}
$result | Add-Member -NotePropertyName Timestamp -NotePropertyValue (Get-Date -Format 'yyyy-MM-dd HH:mm:ss') -PassThru -Force
}
catch { throw }
}Path to the CSV file containing the hierarchy definition