Jump to content


im4gine3

Query and Move computer into specific Collection

Recommended Posts

First off, let me say that this forum has been a massive help to myself when setting up and deploying SCCM 2012 R2 in my current work environment. I would be at loss if i were to read Technet all day.

 

I need a bit of help in terms of Collections and scripting.

 

I have a script working in my task sequence which moves the computer into a specific collection in order to receive updates straight after imaging has been completed (using the following script https://blogs.msdn.microsoft.com/vinpa/2010/09/01/how-to-add-a-knownunknown-computer-to-a-specified-collection-during-os-deployment/),however within that second task sequence, i would like to incorporate another script which will then move that computer object from the current collection into 1 of 'n' collections based on part of their computer name.. for example, 'if the computer name starts off with "NYxxxxx", move the computer into the NY Office collection.

 

I could however use my current working script and created several 'Run Command Line' tasks pointing to different collection ID, but i think that would be very inefficient and want to know if there was a better way.. perhaps nested variables etc

 

 

Any help would be much appreciated

Edited by im4gine3

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.