Removing Classic Teams is a Nightmare, help needed

Posted by MrHappyface92@reddit | sysadmin | View on Reddit | 13 comments

Hi All,

I've been wracking my brain on this for a few weeks now and wondered if anybody has a solution.

The Scenario is that we are attempting to remove Classic Teams from all computers, we're able to do this fairly well using Platform Scripts or Win32 apps within Intune, however I can only seem to get this to run "As User", im guessing due to the app being a User Based installation.

The problem is, MS Defender is still reporting a few thousand devices as being vulnerable, when you check the inventories you can see these are the remaining vulnerable items:

File paths
C:\Users\Administrator\AppData\Local\Microsoft\Teams\current\Teams.exe
Registry paths
HKEY_USERS\Administrator\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Teams

The primary user of this computer has been able to uninstall Teams but .\administrator which is a local account that was created as part of the Task Sequence still remains flagged.

For the life of me I can't seem to get Intune to remove Teams from the Administrator account or profiles that are no longer signed in and likely won't ever be, if I run my script AS user I can get this done.

These Administrator accounts use LAPs so I can't easily use the password details to authenticate as them and run it as user, in my situation a lot of these accounts haven't been signed in for a long time and unless we were to do this by hand, probably will never be.

Our Teams Global Policy is currently set to New Teams Only and we've sucessfully got new Teams everywhere, Classic Teams is no longer usable but our reporting is still haywire because of Teams Machine-Wide Installer, I'd honestly be quite happy just to delete these Registry Keys and Executable files but outside of being logged in as the user, only the executable is viewable meaning that the REG key still flags.

Things I've attempted:

I'm considering running my script that is able to remove AS user but attempting to authenticate as a Global Administrator instead, hoping that this will be able to view the registry keys that SYSTEM can't, but waiting to get some business red tape out of the way before I try this.

Has anyone faced a similar situation? Any help would be much much much appreciated.