jump to navigation

Friendly names when Selecting the Domain OU in MDT 2010 December 11, 2009

Posted by keithga in MDT 2010, VBscript.

Came across a question in a forum recently:

In MDT 2010 when I am in the Deployment Wizard I can select the option to join a domain, enter in my domain and near the bottom I have the option to select my OU with a dropdown menu.
Within my control folder of my deployment share I have a file called DomainOUList.xml that has a long list of all the OUs I want our techs to be able to select from. The structure of the file looks something like this:


How can I make it look like this:
Laptops / Accounting / Calgary / MYDOMAIN

I did some investigation, and discovered that MDT lacks the ability to display Friendly names in the Domain OU selection on the dialog box. This is a problem all the way back to BDD 2007.

Something I forgot to do.

Updated change

It s quick change to DeployWiz_Initialization.vbs to make the wizard display friendly names rather than the OU style.

First we introduce a new set of functions:

Function AddItemToMachineObjectOUOpt(item)   AddItemToMachineObjectOUOptEx item, itemEnd function

Function AddItemToMachineObjectOUOptEx(item,value)  Dim oOption

  set oOption = document.createElement("OPTION")  oOption.Value = value  oOption.Text = item  MachineObjectOUOptional.Add oOption  MachineObjectOUOptionalBtn.style.display = "inline"End function

I personally like to add *EX style function like this, it means that we can reduce the number of changed lines in the code, and keep the old version of the function around for compatibility.

Then later on we modify the code to read the DomainOUList.xml:

iRetVal = oUtility.FindFile( "DomainOUList.xml" , sFoundFile)
if iRetVal = SUCCESS then     For each oItem in oUtility.CreateXMLDOMObjectEx( sFoundFile ).selectNodes("//DomainOUs/DomainOU")

        if oItem.Attributes.getNamedItem("value") is nothing then             AddItemToMachineObjectOUOpt oItem.text         else
            AddItemToMachineObjectOUOptEx oItem.text, oItem.Attributes.getNamedItem("value").value         end if     Next
End if

If the DomainOUList.xml file contains a value attribute in the XML file, it will use that for the value, and the node for the Friendly Name:

 <DomainOU value="OU=Desktops,OU=Accounting,OU=Calgary,DC=MYDOMAIN,DC=AD" > DomainCalgaryAccountingDesktops </DomainOU>

Full sample can be found at:



Keith Garner is a Deployment Specialist with Xtreme Consulting Group


1. Chad - February 27, 2013

Hey guys, I found a MUCH EASIER WAY of doing this. Should mention, thought, that I’m using MDT 2012 SP1. Anyhow, with this configuration, I was able to set options in DomainOUList.xml as follows:



Now when I get to that page in the LightTouch wizard, I have the drop down list to select the OU from and they are very friendly names. When I select one, it then inputs the value (the long, ugly) name into the selection box. Which is fine, because I’ve selected it based on the friendly name that was displayed in the drop-down box.

I didn’t edit any VBScripts or anything. Just make sure in your CustomSettings.ini that you include SkipDomainMembership=NO

I hope that makes sense. Anyways, in all my research I found this blog post VERY helpful, and I honestly kinda stumbled onto the above solution by dumb-luck, so I figure I’d give back to anyone who was in a similar situation.


Chad - February 27, 2013

WOW! Lets try that example again:


(without all the “.” and spaces)

Chad - February 27, 2013

Oh bother… okay well withIN the DomainOU tag, you include: value=”OU=Test1,DC=MyCompany,DC=com”, then you close that particular tag using “>”, then you can put “Test 1” and then close with /DomainOU within the “” signs. Lets hope this displays correctly when I try to post

2. MDT 2012: DomainOUs List | Scriptimus Ex Machina - February 10, 2013

[…] also an old post by Keith Garner here that shows how to display friendly […]

3. Friendly OU List - October 4, 2012

[…] […]

4. iw - August 30, 2012

can you give step by step instructions to get this to work on 2012?
i followed the instructions given and it seems to missing some steps or is not crystal clear……when coming to the vbs stuff. thanks in advanced guys!

Chip - October 23, 2012

Take a closer look at his sample vbs at the end of this article. The formatting in the code boxes is missing most of the line breaks, so you can’t just copy & paste.

5. Chip - August 24, 2012

This will be a huge help, thanks! I’m wondering if there’s a way to add a similar capability to the Domain text box. We have 17 domains in our forest, so a drop down list would prevent typos and confusion.

Taking it a step further, would there be a way to filter the OU list based on the Domain field? Each domain has at least 4 different OUs, so that drop down is pretty crowded.

6. ian - August 15, 2012

has anyone got this too work???

Chip - August 24, 2012

In short: Yes. We’re on MDT2010 update 1.

7. cyprids@gmail.com - May 7, 2012

I see the same issue…Friendly names does not seem to work in MDT 2012…only the friendly name is carried throught to the install, and ofcource the “friendly name” is not a valid X.500 name convention…Furthermore, the Deploymant Wizard will not accept Friendly names without “OU=”

8. Delio J. Castillo - May 3, 2012

One quick note, in MDT2012 this function has been moved to DeployWiz_ComputerName.vbs Line: 61. The updating of MDT to 2012 will break this and the function needs to be readded there. Great article by the way. I have been using this method for a long time now.

9. MDT get friendly names for DomainOUList.xml - myITforum.com | myITforum.com - November 9, 2011
10. Todd Jordan - July 21, 2010

I tried to modify DeployWiz_Initialization.vbs and rebuild my DomainOUList.xml as shown here but its not working. Can you post a corrected DeployWiz_Initialization.vbs for 2010 update 1 and a snipet of their DomainOUList.xml (this page runs off the edge) so I can make sure of the formating please?

11. MDT get friendly names for DomainOUList.xml - Brandon Linton @ myITforum - May 13, 2010

[…] http://deployment.xtremeconsulting.com/2009/12/11/friendly-names-when-selecting-the-domain-ou-in-mdt… Posted: May 13 2010, 08:47 PM by brandonlinton | with no comments […]

12. Bryan - April 8, 2010

Gah! Figured it out. The account I was using to join my PC’s to the domain did not have rights to the particular OU’s I was targetting. 😦

Thanks for a great site!


13. Bryan - April 8, 2010

Help! I’ve implemented the above exactly but my Domain Join is failing:

Initial attempt: JoinDomain(DOMAIN,PWD,DOMAIN\account,OU=Test – Policy Testing,OU=Lab,OU=Test,OU=Test,DC=domain,DC=test,DC=com,3), rc = 5

and then:

JoinDomain Failure: The account *may* already exist in a different OU. Retrying without the specified OU.

and then:

Retry attempt: JJoinDomain(DOMAIN,PWD,DOMAIN\account,,3), rc = 1332

It fails and will never join.

Any ideas?

14. Jon - February 14, 2010

Mine shows that too. I thought it was just supposed to be the friendly name showing.??

15. josh - February 8, 2010


I like this better than the one that comes with MDT. This is much easier for the lvl 1 guys to pick through. Just to make sure I did this right, it is supposed to show string for “DomainOU Value”, and undernearth that it shows the “friendly name”?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: