Teams in a domain environment
Thursday 23 September 2021 at 12:02 pmOK, Teams is a pretty good product, and when it's working, it's great. However in a domain envrionment, particularly with roaming profiles, it's horrible..
As anyone in IT Support will know, it is installed in the user's profile, rather than the usual Program Files area. I think this is known as a Squirrel install or something. The concept is that, since it updates regularly (every couple of weeks or so), it's easy to keep updated because the user doesn't need admin rights all the time.
When you have roaming profiles, Teams wants to store all its junk in there, anything up to about 2Gb in size. When logging on and off, this puts a huge bandwidth and time burden on the system. Because of this, we took the decision not to roam these folders, but the knock-on effect is that everyone has to reinstall Teams when they log on. Back to bandwidth use again, plus user annoyance factor.
There is a machine-wide MSI installer, but it's no good for keeping updated. You can't just download a new one every so often and deploy it. Doesn't work. So here's my workaround, maybe it's not the best way of doing it, but it seems to work for us (for now).
THE WORKARAOUND
This is the concept
- a PowerShell script runs on a server on a scheduled task to download the latest version of the Teams installer exe, and saves it in a shared location.
- a small batch file runs the installer, and;
- Group Policy places a shortcut on the All Users desktop.
It's not automated, but as long as users know where the shortcut is, they can be told to use this when they need Teams.
This is the PowerShell script, which will work as long as Microsoft don't change the location. We're all 64-bit here so it's the x64 version. Change your hyperlink for locale and version.
$source = 'https://go.microsoft.com/fwlink/p/?LinkID=869426&clcid=0x809&culture=en-gb&country=GB&lm=deeplink&lmsrc=groupChatMarketingPageWeb&cmpid=directDownloadWin64'
$destination = '\\pathto\folder\Teamsx64.exe'
Invoke-WebRequest -Uri $source -OutFile $destination
Stick this on a server and make a Scheduled Task to run it every Sunday night (or whatever).
Then Group Policy makes the shortcut:
This is in User Configuration -> Preferences -> Windows Settings -> Shortcuts
I made a nice little custom icon too so it stands out on the desktop.
The install batch file isn't strictly necessary, but if the user just runs the .exe direct, it pauses for a while and doesn't look like it's doing anything. This simple batch shows a window (in custom Teams purple & white!) just to prove to them that something is happening.
@ECHO OFF
COLOR 57
TITLE Teams Installer
ECHO .
ECHO .
ECHO Installing Microsoft Teams, please wait...
\\pathto\folder\Teamsx64.exe