-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstallTeams.ps1
42 lines (36 loc) · 2.18 KB
/
installTeams.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
33
34
35
36
37
38
39
40
41
42
# set regKey
write-host 'AIB Customization: Set required regKey'
New-Item -Path HKLM:\SOFTWARE\Microsoft -Name "Teams"
New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Teams -Name "IsWVDEnvironment" -Type "Dword" -Value "1"
write-host 'AIB Customization: Finished Set required regKey'
# install vc
write-host 'AIB Customization: Install the latest Microsoft Visual C++ Redistributable'
$appName = 'teams'
$drive = 'C:\'
New-Item -Path $drive -Name $appName -ItemType Directory -ErrorAction SilentlyContinue
$LocalPath = $drive + '\' + $appName
set-Location $LocalPath
$visCplusURL = 'https://aka.ms/vs/16/release/vc_redist.x64.exe'
$visCplusURLexe = 'vc_redist.x64.exe'
$outputPath = $LocalPath + '\' + $visCplusURLexe
Invoke-WebRequest -Uri $visCplusURL -OutFile $outputPath
write-host 'AIB Customization: Starting Install the latest Microsoft Visual C++ Redistributable'
Start-Process -FilePath $outputPath -Args "/install /quiet /norestart /log vcdist.log" -Wait
write-host 'AIB Customization: Finished Install the latest Microsoft Visual C++ Redistributable'
# install webSoc svc
write-host 'AIB Customization: Install the Teams WebSocket Service'
$webSocketsURL = 'https://query.prod.cms.rt.microsoft.com/cms/api/am/binary/RE4AQBt'
$webSocketsInstallerMsi = 'webSocketSvc.msi'
$outputPath = $LocalPath + '\' + $webSocketsInstallerMsi
Invoke-WebRequest -Uri $webSocketsURL -OutFile $outputPath
Start-Process -FilePath msiexec.exe -Args "/I $outputPath /quiet /norestart /log webSocket.log" -Wait
write-host 'AIB Customization: Finished Install the Teams WebSocket Service'
# install Teams
write-host 'AIB Customization: Install MS Teams'
$teamsURL = 'https://teams.microsoft.com/downloads/desktopurl?env=production&plat=windows&arch=x64&managedInstaller=true&download=true'
# $teamsURL = 'http://statics.teams.cdn.office.net/production-windows-x64/1.5.00.8070/Teams_windows_x64.msi'
$teamsMsi = 'teams.msi'
$outputPath = $LocalPath + '\' + $teamsMsi
Invoke-WebRequest -Uri $teamsURL -OutFile $outputPath
Start-Process -FilePath msiexec.exe -Args "/I $outputPath /quiet /norestart /log teams.log ALLUSER=1 ALLUSERS=1" -Wait
write-host 'AIB Customization: Finished Install MS Teams'