Skip to main content

MS Teams Uninstall & Install

Summary

This Agent procedure is used to silently uninstall the "Teams Machine-Wide Installer" and install the latest version of the "Teams Machine-Wide Installer" on the machine.

Example Agent Procedure Log

TimeActionStatusUser
1:02:39 pm 12-Dec-24Teams Uninstall & InstallSuccess THENkunal.kumar
1:02:39 pm 12-Dec-24Teams Uninstall & Install-0003Teams is installed successfully and the name is: DisplayName ----------- Teams Machine-Wide Installerkunal.kumar
1:02:39 pm 12-Dec-24Teams Uninstall & Install-0002DisplayName ----------- Teams Machine-Wide Installerkunal.kumar
1:02:39 pm 12-Dec-24Execute Powershell Command (64-bit, Run As System)Success THENkunal.kumar
1:02:39 pm 12-Dec-24Execute Powershell Command (64-bit, Run As System)-0016Powershell command complete. Results returned to global variable #global:psresult# and saved in Agent's Documents tab of server.kunal.kumar
1:02:39 pm 12-Dec-24Execute Powershell Command (64-bit, Run As System)-0016Informational: GetFile command overwrote the server file C:/Kaseya/UserProfiles/155830305870654/GetFiles/../docs/psoutput.txt with the new contents from c:/kworking/psoutput.txt in THEN step 3.kunal.kumar
1:02:36 pm 12-Dec-24Execute Powershell Command (64-bit, Run As System)-0011Executing 64-bit Powershell command as System: "" -command "Get-ItemProperty -Path "HKLM:/SOFTWARE/WOW6432Node/Microsoft/Windows/CurrentVersion/Uninstall/*"Where-Object { $_.DisplayName -ilike 'Teams Machine-Wide Installer' }
1:02:36 pm 12-Dec-24Execute Powershell Command (64-bit, Run As System)-0013Sending output to global variable.kunal.kumar
1:02:36 pm 12-Dec-24Execute Powershell Command (64-bit, Run As System)-0008Custom commands detected as Get-ItemProperty -Path "HKLM:/SOFTWARE/WOW6432Node/Microsoft/Windows/CurrentVersion/Uninstall/*"Where-Object { $_.DisplayName -ilike 'Teams Machine-Wide Installer' }
1:02:36 pm 12-Dec-24Execute Powershell Command (64-bit, Run As System)-0003No Powershell file variable detected.kunal.kumar
1:02:31 pm 12-Dec-24Execute Powershell Command (64-bit, Run As System)-0002Powershell is present.kunal.kumar
1:02:28 pm 12-Dec-24Execute Shell command - Get Results to VariableSuccess THENkunal.kumar
1:02:25 pm 12-Dec-24Execute Shell command - Get Results to Variable-0007Executing command in standard shell as system: C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -ExecutionPolicy Bypass -Command %ProgramData%/_automation/AgentProcedure/Teams/Teams_Windows_x64.msi >"c:/kworking/commandresults-20229988.txt" 2>&1kunal.kumar
1:02:15 pm 12-Dec-24Teams Uninstall & Install-0002Teams is successfully uninstalled from the machine and now proceeding with the installation of the latest version of Teamskunal.kumar
1:02:15 pm 12-Dec-24Teams Uninstall & Install-0001kunal.kumar
1:02:15 pm 12-Dec-24Execute Powershell Command (64-bit, Run As System)Success THENkunal.kumar
1:02:14 pm 12-Dec-24Execute Powershell Command (64-bit, Run As System)-0016Powershell command complete. Results returned to global variable #global:psresult# and saved in Agent's Documents tab of server.kunal.kumar
1:02:14 pm 12-Dec-24Execute Powershell Command (64-bit, Run As System)-0016Informational: GetFile command overwrote the server file C:/Kaseya/UserProfiles/155830305870654/GetFiles/../docs/psoutput.txt with the new contents from c:/kworking/psoutput.txt in THEN step 3.kunal.kumar
1:02:11 pm 12-Dec-24Execute Powershell Command (64-bit, Run As System)-0011Executing 64-bit Powershell command as System: "" -command "Get-ItemProperty -Path "HKLM:/SOFTWARE/WOW6432Node/Microsoft/Windows/CurrentVersion/Uninstall/*"Where-Object { $_.DisplayName -ilike 'Teams Machine-Wide Installer' }
1:02:11 pm 12-Dec-24Execute Powershell Command (64-bit, Run As System)-0013Sending output to global variable.kunal.kumar
1:02:11 pm 12-Dec-24Execute Powershell Command (64-bit, Run As System)-0008Custom commands detected as Get-ItemProperty -Path "HKLM:/SOFTWARE/WOW6432Node/Microsoft/Windows/CurrentVersion/Uninstall/*"Where-Object { $_.DisplayName -ilike 'Teams Machine-Wide Installer' }
1:02:11 pm 12-Dec-24Execute Powershell Command (64-bit, Run As System)-0003No Powershell file variable detected.kunal.kumar
1:02:09 pm 12-Dec-24Execute Powershell Command (64-bit, Run As System)-0002Powershell is present.kunal.kumar
1:02:08 pm 12-Dec-24Teams Uninstall & Install-0001Teams Machine-Wide Installer has been uninstalled from the machine and now proceeding with the validationkunal.kumar
1:01:59 pm 12-Dec-24Teams Uninstall & Install-0001Teams Machine-Wide Installer is installed and now proceeding with the uninstallationkunal.kumar
1:01:59 pm 12-Dec-24Teams Uninstall & InstallDisplayName ----------- Teams Machine-Wide Installerkunal.kumar
1:01:59 pm 12-Dec-24Execute Powershell Command (64-bit, Run As System)Success THENkunal.kumar
1:01:58 pm 12-Dec-24Execute Powershell Command (64-bit, Run As System)-0016Powershell command complete. Results returned to global variable #global:psresult# and saved in Agent's Documents tab of server.kunal.kumar
1:01:56 pm 12-Dec-24Execute Powershell Command (64-bit, Run As System)-0011Executing 64-bit Powershell command as System: "" -command "Get-ItemProperty -Path "HKLM:/SOFTWARE/WOW6432Node/Microsoft/Windows/CurrentVersion/Uninstall/*"Where-Object { $_.DisplayName -ilike 'Teams Machine-Wide Installer' }
1:01:56 pm 12-Dec-24Execute Powershell Command (64-bit, Run As System)-0013Sending output to global variable.kunal.kumar
1:01:56 pm 12-Dec-24Execute Powershell Command (64-bit, Run As System)-0008Custom commands detected as Get-ItemProperty -Path "HKLM:/SOFTWARE/WOW6432Node/Microsoft/Windows/CurrentVersion/Uninstall/*"Where-Object { $_.DisplayName -ilike 'Teams Machine-Wide Installer' }
1:01:56 pm 12-Dec-24Execute Powershell Command (64-bit, Run As System)-0003No Powershell file variable detected.kunal.kumar
1:01:55 pm 12-Dec-24Execute Powershell Command (64-bit, Run As System)-0002Powershell is present.kunal.kumar
1:01:54 pm 12-Dec-24Execute Powershell CommandSuccess THENkunal.kumar
1:01:53 pm 12-Dec-24Execute Powershell Command-0011Powershell command completed!kunal.kumar
1:01:51 pm 12-Dec-24Execute Powershell Command-0011Executing Powershell "" -Command "New-Item -Type Directory -Path %ProgramData%/_automation/AgentProcedure -Name Teams -ErrorAction SilentlyContinue" ""kunal.kumar
1:01:51 pm 12-Dec-24Execute Powershell Command-0010Not sending output to variable.kunal.kumar
1:01:51 pm 12-Dec-24Execute Powershell Command-0008New command variable is: -Command "New-Item -Type Directory -Path %ProgramData%/_automation/AgentProcedure -Name Teams -ErrorAction SilentlyContinue"kunal.kumar
1:01:51 pm 12-Dec-24Execute Powershell Command-0008Custom commands detected as New-Item -Type Directory -Path %ProgramData%/_automation/AgentProcedure -Name Teams -ErrorAction SilentlyContinuekunal.kumar
1:01:46 pm 12-Dec-24Execute Powershell Command-0002Powershell is present.kunal.kumar
1:01:38 pm 12-Dec-24Run Now - Teams Uninstall & InstallAdmin kunal.kumar scheduled procedure Run Now - Teams Uninstall & Install to run at Dec 12 2024 1:01 PM

Process

  1. Use the command to check whether the "Teams Machine-Wide Installer" is installed on the machine.
  2. Uninstall the "Teams Machine-Wide Installer" if it is available on the machine.
  3. Download the latest MSI agent for the installation of the "Teams Machine-Wide Installer."
  4. Install the latest version of Teams.
  5. Validate the installation status.

Output

Agent Procedure Log

Export Attachment

Attach the XML VSA export content to this document.

Attachments

Procedure_MS_Teams_Uninstall___Install.xml