Jump to content


Jeroen van Geem

During deployment, add the collection and run patching cycles?

Recommended Posts

Hi all,

 

I am trying to achieve the following during my OS deployment; Add the device into a collection followed by running some patching cycles. However I cant seem to figure out how to add the device into a patching collection.

 

I found a vb script out 2010 online (attached) which I used, but no luck. This is the line: cscript c:\Installs\Tools\AddMeToCollection.vbs xxxxxx "GLB - Patch Sunday 05:00 - Reboot" %_SMSTSClientIdentity%

 

Are there any new ways to make this possible?

 

Once it is in the collection I was planning on running the following twice:

  • Run script: WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule "{00000000-0000-0000-0000-000000000113}" /NOINTERACTIVE
  • Run script:powershell.exe -command start-sleep 30
  • Install Software Updates (built-in task)

 

But without the system being in a collection it wont do anything. :)

 

Any ideas?

 

Thanks!

2134.AddMeToCollection.txt

Share this post


Link to post
Share on other sites

Hi,

I use that script as well, but you should the CollectionID and not the collectionname in the command line,

cscript AddMeToCollection.vbs <SiteServerName> <CollectionID> %_SMSTSClientIdentity% also make sure either the Network access account or if you run it as a "Run command line step using another user account" that the accounts used have the correct permissions as well. But changing the command line shoudl solve it.

 

Regards,
Jörgen

Share this post


Link to post
Share on other sites

Thanks, will give that one a go.

 

During deployment, after the SCCM client gets installed this script will run maybe one minute after that. Does this give the SCCM server enough time to have the server currently being deployed to be added in its repository?

 

I do know it takes time before a new deployed system shows in the gui.

Share this post


Link to post
Share on other sites

I think I am using the same script, but instead of using the collection "title" use the collection ID (SMS0001 etc) seems to work.! but I do not try to run updates immediately, I have a Update group targeted at the unknowns, but if you have specifics... I basically assign to a maintenance window and wait to the cycle to pick up anything missing. We update the deployments quarterly, so there are generally only a few missing. I would enable incremental updates on the collections that you are hitting, so they see things "quickly"

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.