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
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter