TravisG Posted November 30, 2021 Posted November 30, 2021 Hey all, So just like the title suggests, I would like to get rid of Teams as we are a G Suite school. Therefore, no need to have it automatically added. If a user needs to use it, they can either install the user-level app, or just use the browser (which is what we do on Windows 10). I'm ripping it out via a PowerShell script during OSD via MECM. But then I noticed that once OSD is completed, Teams gets installed upon the first login. So then I created a logon task to remove Teams using the SYSTEM account. And this works as intended. Then about 4 or 5 days later, Teams is reinstalled. And it's installed as a provisioned app. This tells me Microsoft is adding it back somehow. Just like I stated above, I don't want to completely Teams because there are a few legitimate cases, but for the most part it is not needed, and I'm trying to avoid confusing my users. Here is my code to remove it during logon. I know it's redundant, but it's a catch all, just in case. [color=#D4D4D4][font=Consolas][color=#9cdcfe]$TeamsProPkg[/color] = [color=#dcdcaa]Get-AppxProvisionedPackage[/color] -Online | [color=#dcdcaa]Where-Object[/color] { [color=#9cdcfe]$_[/color][color=#dcdcaa].DisplayName[/color] -like [color=#ce9178]'*Teams*'[/color] } | [color=#dcdcaa]Select-Object[/color] -ExpandProperty PackageName -First [color=#b5cea8]1[/color] [color=#dcdcaa]Remove-AppxProvisionedPackage[/color] -PackageName [color=#9cdcfe]$TeamsProPkg[/color] -Online -AllUsers -ErrorAction SilentlyContinue [color=#9cdcfe]$TeamsPkg[/color] = [color=#dcdcaa]Get-AppxPackage[/color] -AllUsers | [color=#dcdcaa]Where-Object[/color] PackageFullName -Match [color=#ce9178]'Teams'[/color] | [color=#dcdcaa]Select-Object[/color] -ExpandProperty PackageFullName -First [color=#b5cea8]1[/color] [color=#dcdcaa]Remove-AppxPackage[/color] -Package [color=#9cdcfe]$TeamsPkg[/color] -ErrorAction SilentlyContinue -AllUsers | [color=#dcdcaa]Out-Null[/color] [/font][/color] Is there a registry key or something that tells Windows to install it? Checked the GPOs, but don't see anything but the chat icon. I haven't tried using dism.exe, but I'm sure the above cmdlets are the same as using dism.exe. Any help will be greatly appreciated. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now