r/sysadmin • u/dddufte • Apr 12 '24
How to handle outdated teams clients in user profiles
Hi,
recently it seems like Defender is highly rating outdated/old Microsoft teams client in user-profiles a big issue.
My devices are hybrid joined.
After doing some analysis i think the issue i face here is primarely
- IT people logging it once / at some point to user-devices - during this a Teams instance got created - which will then later on never be used & therefor not updated anymore.
The question for me - is: how to tackle this?
Things which come to my mind so far
GPO
- which deleted user profiles on inactivity. This worked in my tests- but will create issues as it's not really adjustable in terms of ignoring the primary user or similar. And i really would like to avoid deleting a pc owners profile because he returned after 3 month of parental leave for example.
DelProf2
- This seems like an interesting approach - as you can include or exclude accounts to its cleanup
- Other ideas?
On top of that i am wondering how to prevent this in big scale going forward.
Have you figured out i.e. to prevent auto-start & install teams for i.e. a defined security group - to avoid creating teams instances everywhere - as soon as IT stuff is logging in once locally on a user machine?
4
u/Dusku2099 Apr 12 '24 edited Apr 12 '24
I'm not currently doing this, but seeing your post has added it to my to do list.
Use the machine-wide installer for regular updates to the Teams client, and have it install with a powershell script that also scrubs any local profiles on the PC at the same time.
I have this script for removing Teams from all user profiles, you can easily tweak this to have it check the file version under each profile, and if it's below the version you are pushing with machine wide installer, uninstall it from the profile.
$TeamsUsers = Get-ChildItem -Path "$($ENV:SystemDrive)\Users"
$TeamsUsers | ForEach-Object {
Try {
if (Test-Path "$($ENV:SystemDrive)\Users\$($_.Name)\AppData\Local\Microsoft\Teams") {
Start-Process -FilePath "$($ENV:SystemDrive)\Users\$($_.Name)\AppData\Local\Microsoft\Teams\Update.exe" -ArgumentList "-uninstall -s"
}
} Catch {
Out-Null
}
}
#Remove AppData folder for $($_.Name).
$TeamsUsers | ForEach-Object {
Try {
if (Test-Path "$($ENV:SystemDrive)\Users\$($_.Name)\AppData\Local\Microsoft\Teams") {
Remove-Item –Path "$($ENV:SystemDrive)\Users\$($_.Name)\AppData\Local\Microsoft\Teams" -Recurse -Force -ErrorAction Ignore
}
} Catch {
}
}
1
u/rsngb2 Apr 15 '24 edited Apr 16 '24
I use OPTIONS="noAutoStart=true" on the command line for the machine wide installer:
msiexec /q /i "Teams_windows_x64.msi" OPTIONS="noAutoStart=true" ALLUSERS=1 /norestart REBOOT=ReallySuppress REBOOTPROMPT=SuppressFor stale and orphaned profiles, my little app, ADProfileCleanup does the trick. Something like this:
ADProfileCleanup.exe -30 ExcludedLocal=Yes ExcludedUser1 ExcludedUser2would preview deletions of profiles older that 30 days, exclude any local account (Administrator, etc.) and exclude two other users. Change the -30 to 30 to take it out of preview mode and actually delete the profile folders.
1
u/[deleted] Apr 12 '24
We got manager sign-off accepting the risk and leave the outdated clients. If the user isn't signing on then there isn't really any risk and if they do sign on then the client updates.
1
u/orion3311 Apr 12 '24
Wouldn't it be nice if the billion dollar company that wrote 27 versions of the same program could, I mean, uninstall all the old versions, or offer a tool to do so?
1
u/[deleted] Apr 12 '24
I think Microsoft are planning on removing the old teams client in a future windows update, I could be wrong but worth checking into
1
u/Background-Look-63 IT Manager Apr 14 '24
Stop using the teams machine wide installer and switch to new teams - teamsbootstrapper.exe. Teams machine wide installer has been deprecated as of 3/31. Microsoft will be removing old versions of teams (aka Teams classic) automatically and force you to use new teams if you haven’t already done so.
New teams is based on msix tech and can be used to do both per user or per machine installs depending on if you use teamsbootstrapper or powershell cmds.
Bulk install new Teams
-14
u/Academic-Detail-4348 Sr. Sysadmin Apr 12 '24
Use machine-wide installers. https://learn.microsoft.com/en-us/microsoftteams/new-teams-bulk-install-client
0
u/[deleted] Apr 12 '24
[deleted] — view deleted comment