Need Help Uninstalling and Re-installing Microsoft Teams

that only works if it was installed under the administrator’s account, you’d have to make relevance that checks for the right context, or make the actionscript dependent on different scenarios

for instance this is how I did a generic wireshark uninstall (as native powershell, not actionscript! Which only works on later BES versions)

stop-process -name dumpcap -Force
stop-process -name Wireshark -Force
$RegPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall"

$app = Get-ChildItem -Path $RegPath | Get-ItemProperty | Where-Object {$_.DisplayName -match "Wireshark" }
$app.QuietUninstallString | cmd

You could then replace the $RegPath with like HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Teams (because it’s not a GUID you don’t have to search for it)

But yeah don’t forget to create a relevance condition to this that checks whether the current logged on user has the file present in their appdata and the actionscript uses current user context or it won’t work.

(Sorry I’ve edited this like half a dozen times, I have a very scattered brain and have to read through things to see important things I’ve failed to communicate.)

2 Likes