Back to Basics – Custom Computer Naming in MDT

The rules engine in MDT is one of the most powerful ways of applying settings during OS Deployment. It uses INI files that it parses and converts to task sequence variables. For example, this morning I was tagged in a Tweet where a fellow deployment geek was asking about how to name computers based on year, laptop/desktop, and then the last six digits of the Mac Address. Now, for complex computer naming in MDT you typically use a bit of PowerShell, or VBScript, but you can actually use VBScript syntax directly in the CustomSettings.ini file.

Computer Naming Sample

[Settings]
Priority=ByLaptopType,ByDesktopType, Default

[ByLaptopType]
Subsection=Laptop-%IsLaptop%

[ByDesktopType]
Subsection=Desktop-%IsDesktop%

[Laptop-True]
OSDComputerName=#year(date)#LAD#Right(Replace("%MACADDRESS001%",":",""),6)#

[Desktop-True]
OSDComputerName=#year(date)#DAD#Right(Replace("%MACADDRESS001%",":",""),6)#

[Default]
OSInstall=Y
Custom Computer Naming via Rules in MDT
About the author

Johan Arwidmark

5 2 votes
Article Rating
Subscribe
Notify of
guest
2 Comments
Newest
Oldest Most Voted
Zachary
Zachary
2 years ago

Just out of curiosity, where can I find a list of ALL MDT variables and what the represent? For example, what does %MACADDRESS% vs %MACADDRESS001% vs %MACADDRESS002% represent? And how would I be able to force which MAC address gets the last 6 pulled from it? How could I force it to pull from the Ethernet MAC vs the WiFi MAC? And what would the WiFi MAC variable be if I wanted to know it? Thanks.

Last edited 2 years ago by Zachary

>