The Deployment Bunny

OS Deployment, Virtualization, Microsoft based Infrastructure…

  • Archives

  • Meta

MDT and OU’s, including spaces and odd characters

Posted by Mikael Nystrom on February 22, 2011

I got a question some time ago, it was something like this:

-Hi Mike, just a short question, we can’t get the MachineObjectOU to work since we have a bunch of OU’s that are named using Swedish characters. Do you have any ideas?

And yes, ideas I do have, trust me. So I started playing around and I did discover that MDT does not really like the Unicode format at all, MDT works perfectly fine using ANSI.

I also did some research on Internet and I did discover that there was people asking for this, but no answers. After spending some time in MDT, creating scripts with different levels of success my brain begun to work, A of memory from the past pops up, didn’t Active Directory handle that somehow…and yes, it does. But before we go into that, let’s see how we can put a computer in the correct OU.

Alternative 1:

You can use a property called MachineObjectOU and when in use it could look something like this in customsettings.ini

[Settings]
Priority=MacAddress, Default
Properties=MyCustomProperty

[00:15:1a:1b:1c:1d]
OSDComputername=PC001
MachineObjectOU=OU=ComputersA,OU=Company,DC=viamonstra,DC=com

[Default]
OSinstall=Y

Alternative 2:

If you use the wizard you can use “DomainOUs” in customsettings.ini, that way you will be presented with a list of OU’s to pick from, looks something like this:

[Settings]
Priority=Default
Properties=MyCustomProperty

[Default]
OSinstall=Y
DomainOUs1=OU=ComputersA,OU=Company,DC=viamonstra,DC=com
DomainOUs2=OU=ComputersB,OU=Company,DC=viamonstra,DC=com

Alternative 3:

One other option is to use an xml file called “DomainOUList.xml”, you create it in notepad and save it in the scripts folder in MDT and it should look something like this:

<?xml version=”1.0″ encoding=”utf-8″?>
<DomainOUs>
<DomainOU>
OU=ComputersA,OU=Company,DC=viamonstra,DC=com
</DomainOU>
<DomainOU>
OU=ComputersB,OU=Company,DC=viamonstra,DC=com
</DomainOU>
</DomainOUs>

But, what if I have spaces in my OU name?

Easy, it works perfect, just type in the name of the OU including spaces, like this:

DomainOUs1=OU=This OU has Spaces,OU=Company,DC=viamonstra,DC=com

But, what if I have Swedish characters in my OU name, like ÅÄÖ?

Easy, replace the characters according to this: Å=A, Ä=A, Ö=O.

If the OU is named “Vård och Omsorg” in Active Directory it should look like this:

DomainOUs1=OU=Vard och Omsorg,OU=Company,DC=viamonstra,DC=com

I can’t remember what the function in Active Directory is called, but I know it works. You could test this easy, create a OU called “Östra skolan” and the try to create a OU at the same location called “Ostra skolan”. Can’t be done, “object already exist”

/mike

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 4,173 other followers

%d bloggers like this: