Sccm Software Center Uninstall Greyed Out

5/3/2019
91 Comments

In SCCM 2012 R2 RTM,

There is a known issue that if an application contains multiple Deployment Types, after the application gets installed successfully on the client as available, uninstall button in the software centre is disabled and there is no easy way to perform Uninstallation of the software.

In my example, I have used the application name as 'Orca'

Here are couple of approaches:

Approach 1:

Launch wbemtest

Connect to rootccmclientsdk namespace

Query CCM_Application to get the application (Orca) installed on the client and click show mof and store the information with you.

Now go back to wbemtest

Click ExecuteMethod

Select CCM_Application as class

Choose the method “uninstall” from the drop down

Click Edit Parameters

Enter Id, IsMachineTarget, Revision etc fields from the mof saved and keep rest of the fields as default (I believe null).

Click Execute

Now uninstall action gets trigged on the application.

Approach 2:

I have got the below code from http://social.technet.microsoft.com/Forums/en-US/e41a516f-210a-4124-8ceb-c70972d20168/ccmapplication-0-instances-found-via-powershell?forum=configmanagersdk

Run this powershell script.

$ComputerName = $env:COMPUTERNAME
$ApplicationName = 'Orca'
$ApplicationClass = [WmiClass]'$($ComputerName)rootccmclientSDK:CCM_Application'
$Application = Get-WmiObject -Namespace 'rootccmclientSDK' -Class CCM_Application Where-Object { $_.Name -like '*$($ApplicationName)*' }
$ApplicationID = $Application.Id
$ApplicationRevision = $Application.Revision
$Properties = $ApplicationClass.psbase.GetMethodParameters('Uninstall')
$Properties.EnforcePreference = 0
$Properties.Id = $ApplicationID
$Properties.IsMachineTarget = $false
$Properties.IsRebootIfNeeded = $false
$Properties.Priority = 'High'
$Properties.Revision = $ApplicationRevision
$ApplicationClass.psbase.InvokeMethod('Uninstall',$Properties,$null)

Approach 3:

Install SCCM 2012 R2 CU1 from http://support.microsoft.com/kb/2938441