SCCM Dynamic Computer Naming in Zero Touch Deployments ConfigMgr

ConfigMgr SCCM Dynamic Computer Naming in Zero Touch Deployments. Yet another great post from DeploymentGuys !!!

I have meant to write up a solution for dynamic computer naming in Zero Touch for a while. Many people have emailed or commented on how useful this would be, so here it is.

Index
Dynamic Computer Naming in Zero Touch Deployments
Prerequisites – Dynamic Computer Naming in Zero Touch Deployments
SCCM Dynamic Computer Naming in Zero Touch Deployments ConfigMgr – Table 1

Dynamic Computer Naming in Zero Touch Deployments

Zero Touch Installation relies on a combination of System Centre Configuration Manager (ConfigMgr) and Microsoft Deployment Toolkit (MDT) 2010/2012. The MDT guys wrote an excellent integration tool that adds extra functionality to ConfigMgr, such as new tasks, task sequence templates, and a new wizard for creating boot disks.

The integration also allows the MDT environment to be accessed from within the ConfigMgr task sequence through MDT packages created by an MDT task sequence wizard installed in the ConfigMgr console. This also allows accessing the MDT Deployment Database from within the ConfigMgr environment to set deployment variables (instead of putting them as collection variables).

Patch My PC

The dynamic computer naming process I will describe below uses these integration points and runs UserExit scripts. The USerExit script in this post dynamically builds the computer name by allowing you to run an external script and returning the script’s output to the task sequence process as a variable.

SCCM Dynamic Computer Naming in Zero Touch Deployments ConfigMgr - Fig.1
SCCM Dynamic Computer Naming in Zero Touch Deployments ConfigMgr – Fig.1

The computer name generated by the UserExit script will be based on a location ID (two characters added as a custom property in MDT Deployment Database), the computer chassis typed (L for laptop, W for Workstation, V for Virtual, and X if the chassis can not be identified), and the first seven characters of the computer serial number (removing spaces and replacing them with a minus (-) for situations where the serial number contains spaces such as virtual machines serial numbers).

These three properties are then glued together and provided as the OSDComputername variable for deployment. Hence, you end up with a computer name such as UK (location ID) L (Chassis ID) 1234567 (Serial Number ID). ConfigMgr SCCM Dynamic Computer Naming in Zero Touch Deployments.

Prerequisites – Dynamic Computer Naming in Zero Touch Deployments

For the Dynamic Computer Naming to work, we need to carry out the following tasks:

  1. Create a new property in the MDT Deployment Database (for the two-character location ID)
  2. Configure the CustomSettings.ini file (in the MDT settings package) to query the MDT Deployment Database and run the UserExit script.
  3. Create the UserExit script that generates the computer name and add it to the MDT Toolkit package.

The instructions below assume that you have:

  • Installed MDT 2010/2012 (probably on your central site server) and set up an MDT database.
  • Run the MDT Integration (accessed through the MDT start menu folder and running Install ConfigMgr Integration)
  • Created a task sequence in ConfigMgr using the MDT integration and utilising the MDT-supplied client task sequence template – if you walked through the MDT task sequence wizard, you should have also created the MDT support packages (MDT Boot Image, MDT Settings, MDT Toolkit and MDT USMT packages).

Step 1 – Create a new custom property in the MDT Deployment Database (for the two-character location ID)

The MDT Deployment Database provided with MDT 2010/2012 looks simple but powerful.

In this database, we can store all the variables we used in the MDT Lite Touch world and extra OSD-based variables for use in Zero Touch and server-build task sequences. The MDT Deployment Database contains four main areas for storing variables – Computers, Location, Roles, and Make/Model. In the underlying structure of the database, a separate table stores the settings that are then made visible through the DETAILS tab in each of these areas.

We are on WhatsApp. To get the latest step-by-step guides and news updates, Join our Channel. Click here –HTMD WhatsApp.

Author

Anoop C Nair has been Microsoft MVP from 2015 onwards for 10 consecutive years! He is a Workplace Solution Architect with more than 22+ years of experience in Workplace technologies. He is also a Blogger, Speaker, and leader of the Local User Group Community. His main focus is on Device Management technologies like SCCM and Intune. He writes about technologies like Intune, SCCM, Windows, Cloud PC, Windows, Entra, Microsoft Security, Career, etc.

1 thought on “SCCM Dynamic Computer Naming in Zero Touch Deployments ConfigMgr”

Leave a Comment