Software Update group

Hello,

I am trying to build a software udpate group using powershell in SCCM 2012.  I know the naming convention is like "Priyabrata Software Update group - March" If the update group is already present then it will skip and not create a new one.

I know Software update group with same name can be created in SCCM 2012 in multiples. I just want to be doubly sure that I do not create a new one while doing a Orch Automation. 

Any pointers or link would be helpful for me.

August 16th, 2015 9:53pm

Use the Get-CMSoftwareUpdateGroup and the New-CMSoftwareUpdateGroup cmdlets. The New-CMSoftwareUpdateGroup cmdlet will check if the name already exists, but it will throw an error message. The easiest is if you use the Get-CMSoftwareUpdateGroup cmdlet yourself to verify this yourself. That way you can continue based on the result. For example use a simple check like this:

if (!(Get-CMSoftwareUpdateGroup -Name $SUPName)) {} 

Free Windows Admin Tool Kit Click here and download it now
August 17th, 2015 2:33am

if (!(Get-CMSoftwareUpdateGroup -Name $varGroup)) {} 

Get-CMSoftwareUpdateGroup : This command cannot be run from the current drive. To run this command you must first
connect to a Configuration Manager drive.
At line:1 char:1
+ Get-CMSoftwareUpdateGroup -Name $varGroup

I get this error .. I am running this command in the site server and well connected not sure what this errormean. 

August 19th, 2015 11:55pm

i forgot to do a CD SiteCODE: and run the powershell
Free Windows Admin Tool Kit Click here and download it now
August 20th, 2015 12:01am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics