Last active
October 18, 2019 03:22
-
-
Save billdeitrick/93647629becdb4372f4de389b1a8fd6c to your computer and use it in GitHub Desktop.
This script deploys Microsoft Teams with "autoStart" set to false. This means that Teams won't start large and in charge automatically when the user logs in, until they've run the app for the first time. Works great pushed from Intune.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ((Test-Path -Path "C:\Program Files (x86)\Teams Installer\setup.json") -eq $false) { | |
if ((Test-Path -Path "C:\IntunePSTeamsInstall") -eq $true) { | |
Remove-Item -Path "C:\IntunePSTeamsInstall" -Recurse -Force | |
} | |
New-Item -Path "C:\IntunePSTeamsInstall" -ItemType Directory -Force > $null | |
Set-Location -Path "C:\IntunePSTeamsInstall" | |
Add-Content "install.log" -Value (((Get-Date).DateTime.toString()) + " Downloading installer file.") | |
Invoke-WebRequest -Uri "https://aka.ms/teams64bitmsi" -OutFile "Teams_windows_x64.msi" -UseBasicParsing | |
$found_file = Test-Path -Path "Teams_windows_x64.msi" | |
Add-Content "install.log" -Value (((Get-Date).DateTime.toString()) + " Done downloading installer file. Files is present: $found_file") | |
Add-Content "install.log" -Value (((Get-Date).DateTime.toString()) + " Executing installer.") | |
msiexec /i Teams_windows_x64.msi OPTIONS="noAutoStart=true" /qn | |
Add-Content "install.log" -Value (((Get-Date).DateTime.toString()) + " Handed off to msiexec.") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment