Archive for category SCCM Client

Uninstalling Applications in SCCM not Working

I had quite the experience when several of my applications refused to uninstall. I spent several days troubleshooting this issue and going through logs to the point that I ended up opening a case with Microsoft.

It appears that if any of application that you’re trying to uninstall has an installation deployment job set to ‘available’ or ‘required’ – no uninstall task will work. You have to delete all your installation deployment jobs as it appears that installation jobs have a higher precedence.

Here are some notes from Microsoft.

Here are the details.

The uninstall deployment wasn’t get enforced as per the logs. Here is what we see in the logs.

CIAgentJob({FFF396C4-40D1-481D-AC35-196D80F45D90}): EnforceCIs CIAgent 12/14/2018 11:18:42 AM 2972 (0x0B9C)

Initiating Enforce tasks. CIAgent 12/14/2018 11:18:42 AM 2972 (0x0B9C)

Skipping non compliant policy CI ScopeId_935E5529-E59C-4F44-9332-DBAF15F5C166/ProhibitedApplication_d0830875-5b6a-422b-bfee-142777b8361e:3.         CIAgent 12/14/2018 11:18:42 AM 2972 (0x0B9C)

No mandatory Enforce tasks. No actions will be performed. CIAgent 12/14/2018 11:18:42 AM  2972 (0x0B9C)

  • I could reproduce the same thing in my lab as well. So it seems like since we have an Install deployment active, the uninstall required deployment didn’t get triggered.
  • Performed some testing by removing the active “available” installdeployment from the machine. Now as suspected it triggered the required uninstall deployment and the app got removed.
  • Did some code review and internal checks
  • I could confirm that the install deployment always wins. I.e. even there is an uninstall deployment (required) the install action always WIN.

 

Leave a comment

SCCM 2012 – Software Center Options

The original information came from this source, I’m just adding a few more screenshots for my benefit.

The following script will allow you to change a particular setting found in SCCM 2012’s Software Center.

In Software Center, under the Options tab, and under the Computer maintenance heading, there is a setting – Automatically install or uninstall required software and restart the computer only outside of the specified business hours – that can be set to True (checked) or False (unchecked) by using this script.
2016-10-21_1506
Use the following code to obtain the current status of the option. This code you’ll use as the Discovery script.
$getStatus = Invoke-WmiMethod -Namespace "Root\ccm\ClientSDK" -Class CCM_ClientUXSettings -Name GetAutoInstallRequiredSoftwaretoNonBusinessHours -ComputerName $env:ComputerName -ErrorAction STOP

If ($getStatus.AutomaticallyInstallSoftware -eq "True")
{
Write-Host "Compliant"
}
Else
{
Write-Host "Non-Compliant"
}
Here’s how you’ll add this code to a Configuration Items object.
 discovery
Next, we’ll need to add the code to make the change or Remediation script
Invoke-WmiMethod -Namespace “Root\ccm\ClientSDK” -Class CCM_ClientUXSettings -Name SetAutoInstallRequiredSoftwaretoNonBusinessHours -ArgumentList @($TRUE) -ComputerName $env:ComputerName -ErrorAction STOP
Here’s how you’ll add this code to a Configuration Items object.
remediation
Next, we need to configure a Compliance Rule for the Configuration Item.
compliance
Now, as the final portion, we need to create a Configuration Baseline based on the Configuration Item created here and then deploy the Configuration Baseline.

2 Comments