-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathW365-Fix-MSTeams-Performance.ps1
32 lines (27 loc) · 1.24 KB
/
W365-Fix-MSTeams-Performance.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Function to enable Teams Media Optimization
Function Enable-TeamsMediaOptimization {
Write-Host "Starting Teams Media Optimization configuration..." -ForegroundColor Green
# Path to the Teams registry key
$registryPath = "HKLM:\SOFTWARE\Microsoft\Teams"
$propertyName = "IsWVDEnvironment"
$propertyValue = 1
# Check if the Teams registry key exists
if (-not (Test-Path $registryPath)) {
Write-Host "Teams registry key not found. Creating it..." -ForegroundColor Yellow
New-Item -Path $registryPath -Force
} else {
Write-Host "Teams registry key already exists." -ForegroundColor Cyan
}
# Create or update the registry value
New-ItemProperty -Path $registryPath -Name $propertyName -PropertyType DWORD -Value $propertyValue -Force
Write-Host "Registry key updated successfully!" -ForegroundColor Green
# Verify the value
$currentValue = (Get-ItemProperty -Path $registryPath).$propertyName
if ($currentValue -eq $propertyValue) {
Write-Host "Teams Media Optimization is successfully enabled." -ForegroundColor Green
} else {
Write-Host "Failed to enable Teams Media Optimization." -ForegroundColor Red
}
}
# Call the function
Enable-TeamsMediaOptimization