Edit

Share via


Grant-CsTeamsShiftsPolicy

This cmdlet supports applying the TeamsShiftsPolicy to users in a tenant.

Syntax

Identity (Default)

Grant-CsTeamsShiftsPolicy
    [<CommonParameters>]

GrantToUser

Grant-CsTeamsShiftsPolicy
    [-Identity] <String>
    [[-PolicyName] <String>]
    [<CommonParameters>]

GrantToGroup

Grant-CsTeamsShiftsPolicy
    [[-PolicyName] <String>]
    [-Group] <String>
    [-Rank] <Int32>
    [<CommonParameters>]

GrantToTenant

Grant-CsTeamsShiftsPolicy
    [[-PolicyName] <String>]
    [-Global]
    [-Force]
    [<CommonParameters>]

Description

This cmdlet enables admins to grant Shifts specific policy settings to users in their tenant.

Examples

Example 1

PS C:\> Grant-CsTeamsShiftsPolicy -Identity IsaiahL@mwtdemo.onmicrosoft.com -PolicyName OffShiftAccessMessage1Always

Applies the OffShiftAccessMessage1Always instance of TeamsShiftsPolicy to one user in the tenant.

Parameters

-Force

Suppresses the display of any non-fatal error message that might arise when running the command.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GrantToTenant
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Global

When you use this cmdlet without specifying a user identity, the policy applies to all users in your tenant. To skip a warning when you do this operation, specify "-Global".

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GrantToTenant
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Group

Specifies the group used for the group policy assignment.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GrantToGroup
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Identity

Applicable: Microsoft Teams

UserId to whom the policy is granted. Email id is acceptable.

Parameter properties

Type:UserIdParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:0
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-PolicyName

Applicable: Microsoft Teams

The name of the TeamsShiftsPolicy instance that is being applied to the user.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Rank

The rank of the policy assignment, relative to other group policy assignments for the same policy type.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GrantToGroup
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.Rtc.Management.AD.UserIdParameter

Outputs

System.Object