Why did my PowerShell uninstall of the .NET Framework agent not succeed?

  • Updated


I tried to uninstall the Contrast .NET Framework Agent using the MSI uninstall method like so:

(Get-WmiObject -Class Win32_Product | ? {$_.Name -match "Contrast.NET"}).uninstall()

but I still see elements of the installation remaining such as in the Control Panel->Programs and Features. Why is that?


Uninstalling via the MSI will leave the Contrast Agent's bootstrap registered with Windows.  A cleaner way to uninstall would be to use the registered uninstaller which can be found using the Get-Package command instead, for example:

$uninstaller = (Get-Package -Name "Contrast.NET" -ProviderName Programs).metadata['QuietUninstallString']
cmd.exe /c ""$uninstaller""

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request