For so many years, I've been seeing LANDESK/Ivanti touting their ability to have one template for all provisioning scenarios. For the most part, this is true. But, I am falling short of their nirvana because of OU joining.
Currently, we have 12 OU's that our PC's can land in and I have to maintain 12 separate templates that join the machines to these OU's. I am doing the OU join in the unattend.xml during sysprep processing, not the join domain action in the system configuration pass of the provisioning template.
I have been working on a batch file to run at the beginning of the provisioning process that will prompt the tech to enter the destination OU. What I need to figure out is how to have this batch file write to the template variable, say %destination_ou%, that gets resolved when the inject script action injects the unattend.xml file.
ie: <MachineObjectOU>OU=%destination_ou%,OU=Managed Computers,DC=COMAPANY,DC=CORP</MachineObjectOU> gets resolved to <MachineObjectOU>OU=MyOU,OU=Managed Computers,DC=COMPANY,DC=CORP</MachineObjectOU> after the unattend.xml is injected.
Even if I were to use the join domain action in the system configuration pass, I would still need a way to pass the user input to the provisioning variable. When testing to see the template variables, I can't see them in WinPE, such as %ldhostname% which gets set as a database variable in the template. From a cmd prompt in WinPE, echo %ldhostname% shows %ldhostname% when echo %path% gives me C:\Windows\system32;C:\Windows;C... etc.
Does anyone know of a way this can be done?
Thanks.
EPM 2017.3 SU2