Jump to content


  • 0
anyweb

Customising Windows 7 deployments - part 2.

Question

Step 1. Create a collection variable.

 

 

In Configmgr expand the collections node and select your Deploy 7 x86 collection (if you don't have one, create one for the purpose of this test).

 

 

Right click on the Collection and choose Modify Collection Settings,

 

modify collection settings.jpg

 

click on the Collection Variables tab.

 

Create a new Collection Variable called MachineObjectOU by clicking on the yellow star.

 

MachineObjectOU.jpg

 

De-select the Do not display this value in the ConfigMgr console and enter the desired value in the Value field:

 

OU=VirtualMachines,OU=Inf,DC=server2008,DC=lab,DC=local

 

 

Click Ok to save your settings.

 

 

 

Step 2. Edit The Task Sequence to use the %MachineObjectOU% Variable

 

Now that you have set the Collection Variable it's time to modify your Task Sequence.

 

right click on your Task Sequence and choose Edit, click on the Apply Network Settings step. Select Join a Domain and Enter your Domain values and then for the for the Domain OU: part input the following:

 

%MachineObjectOU%

 

domainou.jpg

 

 

Step 3. Deploy Windows 7 and verify

 

 

Advertise your Task Sequence to the Deploy 7 x86 collection and add a computer to the collection, PXE boot, let the deployment finish and verify that the compuer ends up in the OU you specified. Here's a copy of the Task Sequence used in this example if you want to test it yourself.

 

machineobjectou.xml

 

Simply Import it and change the Domain settings and any references to boot image, operating system image and configmgr client from definition package.

 

ad ou.jpg

 

Troubleshooting notes:

 

* TIP: to get the correct OU statement for the Collection Variable you can open the edit the task sequence step called Apply Network Settings, and click on browse for Domain OU part of join a domain, then copy everything after the LDAP:// statement

* If you deploy Windows 7 and the computer doesn't join the domain or the correct OU then read the c:\windows\debug\netsetup.api log file to find out what the domain join error was.

* Don't try and stick the computer into the Computers container, it will fail

* The account that you use to join the domain (in my example it's domjoin) may need permissions delegated to it to allow it to create objects in the selected OU.

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi - My first post.

 

Im currently using multiple "Join Domain" steps in my task sequnce with a WMI query set to look for the first 3 letters of the hostname, depending on the hostname decides which OU the machine will go into.

 

Cant get this to work, as though it doesnt like the WMI query when its valid.

 

Cant see anything in SMSTS.log indicating any issues. Any ideas ?

 

WMI query is this: SELECT * FROM Win32_ComputerSystem WHERE Name LIKE "%MACHINE _NAME%"

 

We use the OSDComputerName variable before the task sequence runs to name the computer.

 

Thanks

Share this post


Link to post
Share on other sites

  • 0

Hi - My first post.

 

Im currently using multiple "Join Domain" steps in my task sequnce with a WMI query set to look for the first 3 letters of the hostname, depending on the hostname decides which OU the machine will go into.

 

Cant get this to work, as though it doesnt like the WMI query when its valid.

 

Cant see anything in SMSTS.log indicating any issues. Any ideas ?

 

WMI query is this: SELECT * FROM Win32_ComputerSystem WHERE Name LIKE "%MACHINE _NAME%"

 

We use the OSDComputerName variable before the task sequence runs to name the computer.

 

Thanks

 

Personally, I wouldn't do it that way. I'd prefer to configure those options using the customsettings.ini file and keep the complexities out of the task sequence. If you are set on doing it your way, read on...

 

What is the value of the %MACHINE_NAME% variable? What are the 3 letters you are trying to match? Suppose the first three letters of the hostname you are looking for are 'DSK' and 'LAP', your queries should be:

 

SELECT * FROM Win32_ComputerSystem WHERE Name LIKE 'DSK%'

 

SELECT * FROM Win32_ComputerSystem WHERE Name LIKE 'LAP%'

 

Or you could query directly on the OSDComputerName value you set. That would probably be even better

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
Answer this question...

×   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.