MDT and OU’s, including spaces and odd characters

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

Priority=MacAddress, Default



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:



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″?>

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”


Leave a Reply

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

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

Facebook photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.