Grant-CsTeamsWorkLocationDetectionPolicy
This cmdlet applies an instance of the TeamsWorkLocationDetectionPolicy to users or groups in a tenant.
Syntax
Grant-CsTeamsWorkLocationDetectionPolicy []
Grant-CsTeamsWorkLocationDetectionPolicy
-Identity <String>
[[-PolicyName] <String>]
[<CommonParameters>]
Grant-CsTeamsWorkLocationDetectionPolicy
[[-PolicyName] <String>]
[-Group] <String>
-Rank <Int32>
[<CommonParameters>]
Grant-CsTeamsWorkLocationDetectionPolicy
[[-PolicyName] <String>]
[-Global]
[-Force]
[<CommonParameters>]
Description
This cmdlet applies an instance of the TeamsWorkLocationDetectionPolicy to users or groups in a tenant.
Passes 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.
Examples
Example 1
PS C:\> Grant-CsTeamsWorkLocationDetectionPolicy -PolicyName sms-enabled -Identity testuser@test.onmicrosoft.com
Assigns a given policy to a user.
Example 2
PS C:\> Grant-CsTeamsWorkLocationDetectionPolicy -Group f13d6c9d-ce76-422c-af78-b6018b4d9c80 -PolicyName wld-enabled
Assigns a given policy to a group.
Example 3
PS C:\> Grant-CsTeamsWorkLocationDetectionPolicy -Global -PolicyName wld-enabled
Assigns a given policy to the tenant.
Example 3
PS C:\> Grant-CsTeamsWorkLocationDetectionPolicy -Global -PolicyName wld-enabled
Note: Using $null in place of a policy name can be used to unassigned a policy instance.
Parameters
-Force
Suppresses the display of any non-fatal error message that might arise when running the command.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Global
This is the equivalent to -Identity Global
.
Type: | SwitchParameter |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Group
This is the identifier of the group that the policy should be assigned to.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Identity
Specifies the identity of the target user.
Example: testuser@test.onmicrosoft.com
Example: 98403f08-577c-46dd-851a-f0460a13b03d
Use the "Global" Identity if you wish to set the policy for the entire tenant.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PolicyName
Specifies the name of the policy to be assigned. The PolicyName is the policy identity minus the policy scope ("tag:"), for example, a policy that has an identity of "Tag:Enabled" has a PolicyName of "Enabled".
Type: | String |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Rank
The rank of the policy assignment, relative to other group policy assignments for the same policy type.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
System.String
Outputs
System.Void
Related Links
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기