Grant-CsTeamsMediaLoggingPolicy
Assigns Teams Media Logging policy to a user or entire tenant.
Syntax
Identity (Default)
Grant-CsTeamsMediaLoggingPolicy
[[-Identity] <String>]
[[-PolicyName] <String>]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
GrantToTenant
Grant-CsTeamsMediaLoggingPolicy
[[-PolicyName] <String>]
[-PassThru]
[-Global]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
GrantToGroup
Grant-CsTeamsMediaLoggingPolicy
[[-PolicyName] <String>]
-Group <String>
[-PassThru]
[-Rank <Int32>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Assigns Teams Media Logging policy to a user or entire tenant. TeamsMediaLoggingPolicy allows administrators to enable media logging for users. When assigned, it will enable media logging for the user overriding other settings. After unassigning the policy, media logging setting will revert to the previous value.
Examples
EXAMPLE 1
PS C:\> Grant-CsTeamsMediaLoggingPolicy -Identity 'KenMyer@contoso.com' -PolicyName Enabled
Assign Teams Media Logging policy to a single user with the user principal name (UPN) "KenMyer@contoso.com". This will enable media logging for the user.
EXAMPLE 2
PS C:\> Grant-CsTeamsMediaLoggingPolicy -Identity 'KenMyer@contoso.com' -PolicyName $null
Unassign Teams Media Logging policy from a single user with the user principal name (UPN) "KenMyer@contoso.com". This will revert media logging setting to the previous value.
EXAMPLE 3
PS C:\> Grant-CsTeamsMediaLoggingPolicy -Global -PolicyName Enabled
Assign Teams Media Logging policy to the entire tenant. Note that this will enable logging for every single user in the tenant without a possibility to disable it for individual users.
EXAMPLE 4
PS C:\> Grant-CsTeamsMediaLoggingPolicy -Global -PolicyName $null
Unassign Teams Media Logging policy from the entire tenant.
Parameters
-Confirm
Applicable: Microsoft Teams
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | cf |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Global
Applicable: Microsoft Teams
When this cmdlet is used with -Global
identity, the policy applies to all users in the tenant, except any that have an explicit policy assignment. For example, if the user already has Media Logging policy set to "Enabled", and tenant admin assigns "$null" globally, the user will still have Media Logging policy "Enabled".
Parameter properties
Type: | SwitchParameter |
Default value: | False |
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 |
-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: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Identity
Applicable: Microsoft Teams
Specifies the identity of the target user. Acceptable values include:
Example: jphillips@contoso.com
Example: sip:jphillips@contoso.com
Example: 98403f08-577c-46dd-851a-f0460a13b03d
Use the "Global" Identity if you wish to set the policy for the entire tenant.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
Identity
Position: | 1 |
Mandatory: | False |
Value from pipeline: | True |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-PassThru
Applicable: Microsoft Teams
Enables passing a user object through the pipeline that represents the user being assigned the policy. By default, the Grant-CsTeamsMediaLoggingPolicy cmdlet does not pass objects through the pipeline.
Parameter properties
Type: | SwitchParameter |
Default value: | False |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-PolicyName
Applicable: Microsoft Teams
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".
Note that Teams Media Logging policy has only one instance that has PolicyName "Enabled".
If you set PolicyName to a null value, the command will unassign any individual policy assigned to the user.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 2 |
Mandatory: | False |
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: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-WhatIf
Applicable: Microsoft Teams
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | wi |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
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.