Created
March 27, 2025 13:01
-
-
Save ariendg/e8682157303a64224775b90cbec85fa0 to your computer and use it in GitHub Desktop.
Uninstall the classic Teams client using a script DetectionMethod phase2 updater included
This file contains hidden or 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
$softwareInstalled = Get-CimInstance -ClassName Win32_Product | |
$isTeamsClassicInstalled = Test-Path "$($ENV:SystemDrive)\Users\*\AppData\Local\Microsoft\Teams\current\Teams.exe" -ErrorAction SilentlyContinue | |
$TeamsIcon_oldDesktop = Test-Path "$($ENV:SystemDrive)\Users\*\Desktop\Microsoft Teams classic.lnk" -ErrorAction SilentlyContinue | |
switch ($true) { | |
($softwareInstalled.Name -match 'Microsoft Teams Classic') { break } | |
($softwareInstalled.Name -match 'Teams Machine-Wide Installer') { break } | |
($isTeamsClassicInstalled) { break } | |
($TeamsIcon_oldDesktop) { break } | |
Default { Write-Output "No old Teams version found on this device. No actions will be performed." } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment