Teams Admin - Powershell - Assign Group Caller Id Policy - not functional yet.

PHOTO EMBED

Fri Dec 13 2024 00:32:52 GMT+0000 (Coordinated Universal Time)

Saved by @JasonB

Connect-MicrosoftTeams

Use the appropriate Grant cmdlet to assign a policy to a group. You can specify a group by using the object ID, SIP address, or email address.

In this example, we assign a Teams meeting policy named Retail Managers Meeting Policy to a group with an assignment ranking of 1.

Grant-CsTeamsMeetingPolicy -Group "AAG-RES-CALL-GRP" -PolicyName "TEX Called ID Policy" -Rank 2



Script Running Permission
Set-ExecutionPolicy RemoteSigned
Set-ExecutionPolicy Restricted


$GroupName = "AAG-RES-CALL-GRP"
$Group = Get-MgGroup -Filter "displayName eq '$GroupName'"
$GroupId = $Group.Id
Write-Output "Group ID for $GroupName: $GroupId"


$groupName = "AAG-RES-CALL-GRP"
$group = Get-Team | Where-Object {$_.DisplayName -eq $groupName}
$groupId = $group.GroupId

$groupName = "AAG-RES-CALL-GRP"
$group = Get-Team | Where-Object {$_.DisplayName -eq $groupName}
$groupId = $group.GroupId
Grant-CsTeamsMeetingPolicy -Group $groupId -PolicyName "TEX Called ID Policy" -Rank 2
content_copyCOPY