In this article we will show you how to create a Post Install Task on the KACE K2000 to Join a Machine to a Domain and In a specific OU.
This task is a simple modification of the Basic Example join domain task script which comes as a standard task on the K2000.
The script simple modified to also include the OU path when it joins to the machine to the domain and as the previous script worked it retrieves the details (domain name, Username, Password) from the variables included in the command line.
Download Join Domain and OU Task
The Task has been pre-made as a package file ready for import straight into the K2000, so will show up as a Post install Task once imported.
Download the task from the following link join_domain_and_ou.zip
The post install task is a modification of the original vbs script in the join domain task, which comes with the K2000.
Importing Join Domain and OU Task
The optional DNS option is replaced with specifying OU.
Unzip the downloaded file and you should have Join_Domain_and_OU.pkg (Its zipped up, because some browser’s decide to rename the file to a incorrect format.)
- Login to the K2000
- Go to ‘Settings & Maintenance’ tab
- Go to the ‘Package Management’ Sub-Tab
- Select Import K2000 Packages
- Click ‘Choose Action’ and select ‘Upload Package for Import’
- Click ‘Choose File’ and select the location of the downloaded package file (Join_Domain_and_OU.pkg)
- Click Import Package.
Configure Join Domain and OU Task
- Login to the K2000
- Go to ‘Library’ tab
- Go to the ‘Postinstallations Tasks’ Sub-Tab
- Click on the new task you imported called ‘Example: Join Domain and OU’
- Click Duplicate at the bottom of the page.
- Rename the Task to be more specific i.e ‘Join Domain ExampleDomain and MachineOU’
- In the command line replace < > with the contents of what it asks for between bracket I.E:
‘join_domain_and_OU.vbs <Domain> <User> <Password> <OU=MyFirstOU,DC=mydomain,DC=local>’
‘join_domain_and_OU.vbs MyDomain MyUsername MyPassword OU=MyOU,DC=MyDC,DC=com’
- Click Save.
You now created the task, remember in the command line to remove the brackets < > and not to use spaces in the variables as spaces are used as delimiter between each variable.
Also remember if you have automatic login turned on as part of the script / Image (Which is Useful as otherwise your install will sit when it boots up for the first time, waiting for you to log in so it can start its post install tasks) to have automatic login to stop after 1 reboot (Can be set in a unattended scripted install or sysprep) as the Join Domain task sets in the post install task but doesn’t actually join until the machine reboots (A reboot task as the finally post install task could be useful as well) but will fail if automatic login is still on after the reboot.Download Article