SCCM I AM

Ad you

Tuesday, November 13, 2018

How to disable a SCCM software update deployment using Powershell

How to disable a SCCM software update deployment using Powershell

Since Microsoft added Powershell as integral part of System Center Configuration Manager, SCCM admin has now option to use Powershell to apply automation. As a part of this automation, I will show you how to disable a SCCM software update deployment using Powershell command.

With below Powershell script(three lines of code), you can automate software update deployment status. Create a .PS1 file from below and run it(on demand or make a schedule task to run it as per requirement).

Import-Module "D:\Program Files\Microsoft ConfigurationManager\AdminConsole\bin\ConfigurationManager.psd1"
CD CST:
Set-CMSoftwareUpdateDeployment -SoftwareUpdateGroupName Mar18-2012R2 -DeploymentName Mar18-2012R2 -Enable 0

Please note below:
1) Location of SCCM installation may vary. In my case it was D drive. So please change location as per your requirement to get the .psd1 file.

2) CD CST:  - CST is site code of my CAS site. It may be different in your case. Please change it as per your requirement

3) Set-CMSoftwareUpdateDeployment -SoftwareUpdateGroupName <name of your target SUG> -DeploymentName <name of you target deployment > -Enable

Enable > 0 means to turn off and 1 means to turn on the deployment.





Go back to console and you will find that your target software update deployment has been disabled.

If this post helps you or you like it, kindly leave below your valuable comment. Thanks.


0 comments:

Post a Comment