Commands › Microsoft Teams

Set-CsTeamsVdiPolicy

Microsoft Teams MicrosoftTeams Set-*

The SetCsTeamsVdiPolicy cmdlet allows administrators to update existing Vdi policies that can be assigned to particular users to control Teams features related to Vdi.

Quick start script

# Set-CsTeamsVdiPolicy — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-MicrosoftTeams -CertificateThumbprint $thumb -ApplicationId $appId -TenantId $tenantId

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-CsTeamsVdiPolicy
$before | Format-List

# 3. Make the change (dry run first)
Set-CsTeamsVdiPolicy -Identity <String> -WhatIf
Set-CsTeamsVdiPolicy -Identity <String>

# 4. Verify and diff
$after = Get-CsTeamsVdiPolicy
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

Set-CsTeamsVdiPolicy [-DisableCallsAndMeetings <Boolean>] [-DisableAudioVideoInCallsAndMeetings <Boolean>]
 [-VDI2Optimization <String>] [-Identity] <String> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters (7)

ParameterTypeRequiredWhat it controls
-Confirm SwitchParameter Prompts you for confirmation before running the cmdlet.
-DisableAudioVideoInCallsAndMeetings Boolean Determines whether a user on a non-optimized Vdi environment can hold person-to-person audio and video calls. Set this to TRUE to disallow a non-optimized user to hold person-to-person audio and video calls. Set this...
-DisableCallsAndMeetings Boolean Determines whether a user on a non-optimized Vdi environment can make all types of calls. Set this to TRUE to disallow a non-optimized user to make calls, join meetings, and screen share from chat. Set this to FALSE...
-Force SwitchParameter Specifies whether to suppress warning and confirmation messages. It can be useful in scripting to suppress interactive prompts. If the switch isn't provided in the command, you're prompted for administrative input if...
-Identity String yes Specify the name of the policy being created.
-VDI2Optimization String Determines whether a user can be VDI 2.0 optimized. * Enabled - allow a user to be VDI 2.0 optimized. * Disabled - disallow a user to be VDI 2.0 optimized.
-WhatIf SwitchParameter Shows what would happen if the cmdlet runs. The cmdlet is not run.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.