Uninstall button is disabled in Software Centre in SCCM 2012 R2 for available Applications

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 root\ccm\clientsdk 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 https://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)\root\ccm\clientSDK:CCM_Application"
$Application = Get-WmiObject -Namespace "root\ccm\clientSDK" -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 https://support.microsoft.com/kb/2938441