|
| 1 | +--- |
| 2 | +external help file: Microsoft.Teams.Policy.Administration.Cmdlets.Core.dll-Help.xml |
| 3 | +Module Name: MicrosoftTeams |
| 4 | +online version: https://learn.microsoft.com/powershell/module/teams/grant-csteamsvirtualappointmentspolicy |
| 5 | +schema: 2.0.0 |
| 6 | +ms.author: erocha |
| 7 | +--- |
| 8 | + |
| 9 | +# Grant-CsTeamsVirtualAppointmentsPolicy |
| 10 | + |
| 11 | +## SYNOPSIS |
| 12 | +This cmdlet applies an instance of the TeamsVirtualAppointmentsPolicy to users or groups in a tenant. |
| 13 | + |
| 14 | +## SYNTAX |
| 15 | + |
| 16 | +### Identity (Default) |
| 17 | +``` |
| 18 | +Grant-CsTeamsVirtualAppointmentsPolicy [<CommonParameters>] |
| 19 | +``` |
| 20 | + |
| 21 | +### GrantToUser |
| 22 | +``` |
| 23 | +Grant-CsTeamsVirtualAppointmentsPolicy -Identity <String> [[-PolicyName] <String>] [<CommonParameters>] |
| 24 | +``` |
| 25 | + |
| 26 | +### GrantToGroup |
| 27 | +``` |
| 28 | +Grant-CsTeamsVirtualAppointmentsPolicy [[-PolicyName] <String>] [-Group] <String> -Rank <Int32> |
| 29 | + [<CommonParameters>] |
| 30 | +``` |
| 31 | + |
| 32 | +### GrantToTenant |
| 33 | +``` |
| 34 | +Grant-CsTeamsVirtualAppointmentsPolicy [[-PolicyName] <String>] [-Global] [-Force] [<CommonParameters>] |
| 35 | +``` |
| 36 | + |
| 37 | +## DESCRIPTION |
| 38 | + |
| 39 | +This cmdlet applies an instance of the TeamsVirtualAppointmentsPolicy to users or groups in a tenant. |
| 40 | + |
| 41 | +Pass in the `Identity` of the policy instance in the `PolicyName` parameter and the user identifier in the `Identity` parameter or the group name in the `Group` parameter. One of either `Identity` or `Group` needs to be passed. |
| 42 | + |
| 43 | + |
| 44 | +## EXAMPLES |
| 45 | + |
| 46 | +### Example 1 |
| 47 | +```powershell |
| 48 | +PS C:\> Grant-CsTeamsVirtualAppointmentsPolicy -PolicyName sms-enabled -Identity [email protected] |
| 49 | +``` |
| 50 | + |
| 51 | +Assigns a given policy to a user. |
| 52 | + |
| 53 | +### Example 2 |
| 54 | +```powershell |
| 55 | +PS C:\> Grant-CsTeamsVirtualAppointmentsPolicy -Group f13d6c9d-ce76-422c-af78-b6018b4d9c80 -PolicyName sms-enabled |
| 56 | +``` |
| 57 | + |
| 58 | +Assigns a given policy to a group. |
| 59 | + |
| 60 | + |
| 61 | +### Example 3 |
| 62 | +```powershell |
| 63 | +PS C:\> Grant-CsTeamsVirtualAppointmentsPolicy -Global -PolicyName sms-enabled |
| 64 | +``` |
| 65 | + |
| 66 | +Assigns a given policy to the tenant. |
| 67 | + |
| 68 | +### Example 3 |
| 69 | +```powershell |
| 70 | +PS C:\> Grant-CsTeamsVirtualAppointmentsPolicy -Global -PolicyName sms-enabled |
| 71 | +``` |
| 72 | + |
| 73 | +Note: _Using $null in place of a policy name can be used to unassigned a policy instance._ |
| 74 | +## PARAMETERS |
| 75 | + |
| 76 | +### -Force |
| 77 | +Suppresses the display of any non-fatal error message that might arise when running the command. |
| 78 | + |
| 79 | +```yaml |
| 80 | +Type: SwitchParameter |
| 81 | +Parameter Sets: GrantToTenant |
| 82 | +Aliases: |
| 83 | + |
| 84 | +Required: False |
| 85 | +Position: Named |
| 86 | +Default value: None |
| 87 | +Accept pipeline input: False |
| 88 | +Accept wildcard characters: False |
| 89 | +``` |
| 90 | +
|
| 91 | +### -Global |
| 92 | +This is the equivalent to `-Identity Global`. |
| 93 | + |
| 94 | +```yaml |
| 95 | +Type: SwitchParameter |
| 96 | +Parameter Sets: GrantToTenant |
| 97 | +Aliases: |
| 98 | +
|
| 99 | +Required: True |
| 100 | +Position: 0 |
| 101 | +Default value: None |
| 102 | +Accept pipeline input: False |
| 103 | +Accept wildcard characters: False |
| 104 | +``` |
| 105 | + |
| 106 | +### -Group |
| 107 | +This is the identifier of the group that the policy should be assigned to. |
| 108 | + |
| 109 | +```yaml |
| 110 | +Type: String |
| 111 | +Parameter Sets: GrantToGroup |
| 112 | +Aliases: |
| 113 | +
|
| 114 | +Required: True |
| 115 | +Position: 0 |
| 116 | +Default value: None |
| 117 | +Accept pipeline input: False |
| 118 | +Accept wildcard characters: False |
| 119 | +``` |
| 120 | + |
| 121 | +### -Identity |
| 122 | +Specifies the identity of the target user. |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | +Example: 98403f08-577c-46dd-851a-f0460a13b03d |
| 127 | + |
| 128 | +Use the "Global" Identity if you wish to set the policy for the entire tenant. |
| 129 | + |
| 130 | +```yaml |
| 131 | +Type: String |
| 132 | +Parameter Sets: GrantToUser |
| 133 | +Aliases: |
| 134 | +
|
| 135 | +Required: True |
| 136 | +Position: Named |
| 137 | +Default value: None |
| 138 | +Accept pipeline input: False |
| 139 | +Accept wildcard characters: False |
| 140 | +``` |
| 141 | + |
| 142 | +### -PolicyName |
| 143 | +Specifies the name of the policy to be assigned. The PolicyName is the policy identity minus the policy scope ("tag:"), e.g. a policy that has an identity of "Tag:Enabled" has a PolicyName of "Enabled". |
| 144 | + |
| 145 | +```yaml |
| 146 | +Type: String |
| 147 | +Parameter Sets: GrantToUser, GrantToGroup, GrantToTenant |
| 148 | +Aliases: |
| 149 | +
|
| 150 | +Required: False |
| 151 | +Position: 1 |
| 152 | +Default value: None |
| 153 | +Accept pipeline input: False |
| 154 | +Accept wildcard characters: False |
| 155 | +``` |
| 156 | + |
| 157 | +### -Rank |
| 158 | +The rank of the policy assignment, relative to other group policy assignments for the same policy type. |
| 159 | + |
| 160 | +```yaml |
| 161 | +Type: Int32 |
| 162 | +Parameter Sets: GrantToGroup |
| 163 | +Aliases: |
| 164 | +
|
| 165 | +Required: True |
| 166 | +Position: Named |
| 167 | +Default value: None |
| 168 | +Accept pipeline input: False |
| 169 | +Accept wildcard characters: False |
| 170 | +``` |
| 171 | + |
| 172 | +### CommonParameters |
| 173 | +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). |
| 174 | + |
| 175 | +## INPUTS |
| 176 | + |
| 177 | +### System.String |
| 178 | + |
| 179 | +## OUTPUTS |
| 180 | + |
| 181 | +### System.Void |
| 182 | + |
| 183 | +## NOTES |
| 184 | + |
| 185 | +## RELATED LINKS |
| 186 | +[Get-CsTeamsVirtualAppointmentsPolicy](Get-CsTeamsVirtualAppointmentsPolicy.md) |
| 187 | + |
| 188 | +[New-CsTeamsVirtualAppointmentsPolicy](New-CsTeamsVirtualAppointmentsPolicy.md) |
| 189 | + |
| 190 | +[Set-CsTeamsVirtualAppointmentsPolicy](Set-CsTeamsVirtualAppointmentsPolicy.md) |
| 191 | + |
| 192 | +[Remove-CsTeamsVirtualAppointmentsPolicy](Remove-CsTeamsVirtualAppointmentsPolicy.md) |
| 193 | + |
0 commit comments