Unable to uninstall an application with the help of Azure DSC configuration

Girish Prajwal 706 Reputation points
2020-10-16T06:28:17.247+00:00

Hi Team,

We are unable to uninstall an older version of application with the help of Azure DSC. We are using the modules get-wmiobject for the same.

$app = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -eq "Application Name"}

$app.Uninstall()

However, the above command is not working.

What is our other options

get-package module is our next option however, it may take time for us to implement it.
Get-Package -Name "Application Name"-RequiredVersion "1.0" | Uninstall-Package

Please suggest.

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,177 questions
{count} votes