When prestaging computers, the objective is to pre-populate Active Directory with details on the computer that is to be deployed. A significant detail is the identifier that must be used to differentiate between computers. This identifier can be: hardware GUID or MAC address.
- In Ivanti Automation, create a Module with a Task Execute Command with the following command line:
C:\Windows\System32\wdsutil.exe /add-device /device:$[Workstation name] /id:$[MAC Address] /wdsclientunattend:wdsclientunattend\WinPE.xml /bootprogram:boot\x64\pxeboot.n12 /referralserver:<FQDN of your WDS server>
- Create 2 parameters for this Module:
- A text parameter $[Workstation name]. On the Input tab, select Parameter value is required (may not be empty).
- A text parameter $[MAC Address] with input mask HH-HH-HH-HH-HH-HH; On the Input tab, select Parameter value is required (may not be empty).
Install the Ivanti Automation Agent
The Ivanti Automation Agent is installed in the last phase of the setup.
- Choose one of the following:
- Create an MSI file that puts the Agent in a preconfigured Team.
- Install the MSI file with an option ADDTOTEAM to make sure the Agent joins a specific Team.
- Configure the Team in such a way that a new member of the Team will execute a Module with one parameter $[NetBIOSName] and a Task Delete Local user. In the Logon name field, specify tempaccount. This line removes the unavoidable useraccount that you need to configure during setup. You may change the name, but then make sure you change the name in the PostPE.xml file as well.
Auto-generate computer names
In real life, people tend not to remember the last issued computer name. And they don’t need to. This can easily be automated using the following Task which can be combined with the pre-staging Task Execute Command.
- First, create a string type registry key somewhere in the HKLM\SOFTWARE tree on the WDS server. For example: HKLM\SOFTWARE\Maverick with keyname Counter and value xxxx, where xxxx is the last issued computer name number. So if PC-2345 is your last deployed workstation, the value of Counter is 2345.
- Create a Task Apply Registry Settings.
- Set the value of the HKLM\SOFTWARE\Maverick\Counter to @[CALC(@[REGISTRY(HKEY_LOCAL_MACHINE\SOFTWARE\Maverick\Counter)],+,1)]
- Execute this Task on the WDS server before the pre-staging Task, to use this counter to construct the next available computer name. For example: [email protected][REGISTRY(HKEY_LOCAL_MACHINE\SOFTWARE\Maverick\Counter)].