Unable to uninstall a software with Powershell admin session

MoTaar 310 Reputation points
2024-11-27T22:10:46.9333333+00:00

I am trying to uninstall some softwares with RMM (powershell admin) but I am not able as the software is not showing up with this command:

$packages = Get-Package | Where-Object { $_.Name -like "webex" }

But on the device I can do so with powershell opened with user session.

Also it doesn't show up when I run the script above on powershell as admin on the device.

I tried to use regestry way to uninstall it with Get-ChildItem the software shows up but the process complete with no error, with the script bellow but it doesn't uninstall the software.

$program = Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall | Get-ItemProperty | Where-Object {$_.DisplayName -match "webex" } | Select-Object -Property DisplayName, Uninstallstring, QuietUninstallString

start-process cmd.exe -argumentlist "/c ""$($program.quietUninstallString) /norestart""" -Wait

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,692 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.