Grant-CsTeamsMediaLoggingPolicy

Assigns Teams Media Logging policy to a user or entire tenant.

Syntax

Grant-CsTeamsMediaLoggingPolicy
     [[-Identity] <String>]
     [-PassThru]
     [[-PolicyName] <String>][-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Grant-CsTeamsMediaLoggingPolicy
     [-PassThru]
     [[-PolicyName] <String>]
     [-Global]
     [-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

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams, Skype for Business Online

-Global

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".

Type:SwitchParameter
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams, Skype for Business Online

-Identity

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.

Type:String
Position:1
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Microsoft Teams, Skype for Business Online

-PassThru

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.

Type:SwitchParameter
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams, Skype for Business Online

-PolicyName

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.

Type:String
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams, Skype for Business Online

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams, Skype for Business Online

Inputs

System.String

Outputs

System.Object