Customization Specification and CustomizationSysPrepText

What I try to do is create a Template / Customization Specification pair that will import a XP Computer to a Specified OU in AD - not the default computers.

I have a Customization Spesification that works.

I want to add the sysprep setting MachineObjectOU.

Have found out that I can probably do this by adding the Customization Spesification property CustomizationSysPrepText.

I export the Cust. Spec. to a XML file, then I edit the file and finally I import it again to VC.

I do not manage to add the 2 types vim.vm.customization.Sysprep and vim.vm.customization.SysprepText to the same XML-file.

Have found out by WSDL type Def. that they both are sub-properties of "CustomizationSpec"

CustomizationSpec :

Extended by

CustomizationLinuxPrep, CustomizationSysprep, CustomizationSysprepText

I have also a Custom Spec XML-file that I have created by importing a sysprep.inf file with the MachineObjectOU setting.

It works but I looses at the same time some of the options I have in the normal Cust.Spec system (ie. Computer-name = VM-name)

Can anyone help me to how add the CustomizationSysPrepText property in a Custom Spec. XML-file ?

The following is a copy of the identity part in XML-file created from sysprep :

;SetupMgrTag MachineObjectOU="OU=VDM-Computers,DC=VDMDOMAIN,DC=vmeduc,DC=local"

Jan Erik Holo

0 Kudos
2 Replies


Can you tell me if you have found the sollution to your problem yet?

I have the same problem and try to solve it.

Greets Dennis

0 Kudos

Here is what I do, not sure if this will help you are not:

1) Wrote a VB script and placed in my template (any place on C: is fine - whatever fits in your standards.)

2) Call the VB script as a "Run Once" option from the customization GUI

3) My script has some interaction (prompts to see if you indeed want to move the object to the new OU) - but you customize to just "do it" with no interaction.

Here is the script:



' Script Name: MoveServer.vbs

' Author: Slickbag

' Last Modified: 03/02/2005


' Purpose: This script is used as part of the SysPrep process to

' move the server object in Active Directory to the

' correct organizational unit.



On Error Resume Next

strMessage1 = "This script will move the servers Active Directory object to the 'Servers' OU in yourdomainnamehere. "

strMessage2 = "Click 'Yes' if the following are true: You sucessfully joined the domain during the Sysprep process and you are currently logged into the yourdomainnamehere domain with Administrative rights. "

strMessage3 = "If you click 'No', you will need to manually move the server object into the 'Servers' OU later."

strError1 = "Unable to move server object to the 'Servers' OU - please move the object manually"

'Prompt for script execution confirmation

result = MsgBox(strMessage1 & strMessage2 & strMessage3, VBYesNo, "Move server object to correct OU script")

If result = vbNo Then

WScript.Echo "Script cancelled - please move the server object manually"


strComputer = "."

Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!
" & strComputer & "\root\cimv2")

Set colSettings = objWMIService.ExecQuery ("Select * from Win32_ComputerSystem")

For Each objComputer in colSettings

strName = objComputer.Name


Set objNewOU = GetObject("LDAP://OU=Servers,DC=yourdomain,DC=com")

Set objMoveComputer = objNewOU.MoveHere ("LDAP://CN=" & strName &",CN=Computers,DC=yourdomain,DC=com", vbNullString)

If Err.Number <> 0 Then

Wscript.Echo strError1



WScript.Echo "Server object sucessfully moved"

End If

End If


'***Portions of this script provided by the Scripting Center at

Hope this helps. I did not read you whole post (a lot of XML there!) - so I might have missed some things you were trying to do there.