Skip to content
SCCM Dynamic Computer Naming in Zero Touch Deployments ConfigMgr

SCCM Dynamic Computer Naming in Zero Touch Deployments ConfigMgr

Written By Anoop C Nair
Last Updated July 24, 2024
Posted In SCCM
SHARE

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.

Written by

Anoop C Nair is Workplace Technology solution architect with 25+ years of experience in global enterprise organizations such as JP Morgan, Capgemini, etc. Microsoft Certified Trainer. Microsoft MVP from 2015 onwards for consecutive 11+ years! He also conducts Intune and modern workplace tech training for enterprise organizations. He is Blogger, Speaker, and Founder of HTMD Community and HTMD Conference. His main focus is on Device Management technologies like Intune, Windows, Cloud PC. He writes about technologies like Intune, SCCM, Windows, Cloud PC, Windows, Entra, Microsoft Security.

Discussion · 1 comment

Join the discussion

Your email address will not be published. Required fields are marked *

Related guides

Intune

Windows 11 KB5101650 KB5099414 July 2026 Patch and 3 Zero Day Vulnerabilities and 570 Flaws

Key Takeaways Windows 11 KB5101650 KB5099414 July 2026 Patch and 3 Zero Day Vulnerabilities and 570 Flaws! In the July 2026 Patch, Microsoft introduced new features designed to improve the overall Windows experience. The update adds enhancements to Windows Update for more flexible update management and introduces Point-in-Time Restore, providing an additional recovery option for […]

AC Anoop C Nair 9 min read
Intune

2026 June KB5094126 KB5093998 Windows 11 Patch | 3 Zero Day Vulnerabilities and 200 Flaws

Key Takeaways 2026 June KB5094126 KB5093998 Windows 11 Patch | 3 Zero Day Vulnerabilities and 200 Flaws! The June 2026 Windows 11 Patch Tuesday update brings several improvements to File Explorer. It adds support for additional archive formats, including UU, CPIO, XAR, and NuGet Packages (NUPKG). The update also preserves View and Sort preferences in […]

AC Anoop C Nair 10 min read
Intune

2026 May KB5089549 KB5087420 Windows 11 Patch | 0 Zero Day Vulnerabilities and 120 Flaws

Key Takeaways The Windows 11 May 2026 Patch KB5089549 KB5087420 Update brings important security fixes, performance improvements, and reliability enhancements across the operating system. The update introduces new features such as Xbox Mode for gaming, File Explorer improvements, enhanced input and sharing experiences, better taskbar and Windows Hello reliability, and additional enterprise management capabilities for […]

AC Anoop C Nair 8 min read
SCCM

ConfigMgr 2603 Introduces New Early Update Enrollment Process

Key Takeaways In this post we are discussing the ConfigMgr 2603 Introduces New Early Update Enrollment Process. Microsoft has officially released Configuration Manager version 2603 to the Early Update Ring, giving organizations an opportunity to test upcoming improvements before the global production rollout. The release is targeted at enterprises running ConfigMgr version 2409 or later […]

AC Anoop C Nair 3 min read