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.
  1. #1 by Jarred Masterson on March 4, 2015 - 6:25 pm

    I'm surprised you don't have any comments on this. I just tested it and it's working beautifully. I have around 10 computer labs that I need this setting changed on, and I've reached a point where I refuse to do this sort of thing manually!!! I had a bit of a hard time finding this post on how to get it done since I couldn't find a way to default it from the SCCM console.

    Like

  2. #2 by used laptop wholesale in chennai on March 23, 2015 - 11:08 am

    Helpful tricks and tips. Being a beginner, found it very useful.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: