Customize IT Organization Using Variables in MDT

As I covered previously, you can customize the CustomSettings.ini in the Microsoft Deployment Toolkit (MDT) to show a custom message like the name of your IT department or company/organization when an OS deployment is running.  You can take this customization a step further by using variables within the MDT environment to customize the message further.

Why would you want to use a variable when deploying an OS? Using variables in the _SMSTSOrgName is a good way to keep track of computers if you’re deploying multiple computers at once like in a lab. It also gives you a way to have essential information at a glance when you’re deploying the OS rather than having to wait until the Task Sequence finishes.

Start off by opening the CustomSettings.ini file in your MDT deployment share.  It will be located in .\DeploymentShare\Control\CustomSettings.ini.  Here’s an example of a default CustomSettings.ini from my last post:

02-mdt_smstsorgname_notepad_no_orgname

In the [Default] section, add the _SMSTSOrgName= section:

Next, you’ll need to choose which variables you’ll want to use.  Here’s a short list of what’s been useful to me.  (If you find more, feel free to add them in the comments and I’ll update the article.)

  • %TaskSequenceID% – Task Sequence ID (as configured in your MDT deployment share) for the currently running Task Sequence
  • %OSDComputername% – Name of the computer actively being deployed as specified in CustomSettings.ini or during initial configuration
  • %Make% – Manufacturer of the computer (e.g. Dell, Lenovo, etc.)
  • %Model% – Model of the computer
  • %Architecture% – Architecture/Bitness of the computer: x86 or x64
  • %VMPlatform% – If the computer is a VM, platform of the VM
  • %DefaultGateway% – Network gateway of the computer being deployed
  • %DeploymentMethod% – Deployment method: UNC, Media, or SCCM

In this example, I use the Task Sequence ID along with the model of the computer.  Since this was a Hyper-V VM, it showed as “Deploying WIN7X to Virtual Machine.”

01-smstsorgname-variables-example1

In this example, I use the OSDComputerName and the Default Gateway that displays as “TTN-42KAKB1 (10.0.75.1) in progress…”

02-smstsorgname-variables-example2

One other note, the _SMSTSOrgName entry in CustomSettings.ini doesn’t have a maximum length that I could find.  I tried running a task using 1234567890 repeated over and over to determine the maximum length and came up with 36.  However, after some additional playing around with the variables, I was able to get as many as 47 characters on the Installation Progress window.  It appears that _SMSTSOrgName is really only limited by the font that it uses and which characters are in the text that you’re displaying.

Kyle Beckman

Kyle Beckman

Kyle is a Systems Administrator with 15+ years of experience. He currently works in Higher Education supporting everything from smartphones to desktop PC's to Hyper-V Failover Clusters. (If it has a IP address, he probably supports it!) He has also worked in Small Business IT consulting supporting a wide variety of businesses and non-profit organizations.

Kyle is also the Vice President of the Atlanta Windows Infrastructure and Virtualization User Group (WINVUG).You can find additional articles he's written on 4sysops.com.
Kyle Beckman

4 Comments

Add a Comment
  1. This is a great tip but I can’t seem to use variables in my CS.ini.

    Instead it just puts in the literal text string

    For example, if my CS.ini has
    _SMSTSOrgName=Deploying %TaskSequenceID% to %Model%

    I should get the following show up during deployment
    “Deploying Win7x64 to Desktop”
    instead I get
    “Deploying %TaskSequenceID% to %Model%”

    Do you know what’s going wrong?

    1. I can’t say I’ve seen that in my production or lab environment.

  2. Thanks for the post .. Is there any way to increase the size of the popup that displays. I would love to have %TaskSequenceID% %OSDComputername% %Make% %Model% I don’t get the full description it’s cut off. So I have limited it to %Architecture% %Make% & %Model%.

    1. I haven’t tried before, but I wouldn’t be surprised if you can edit one of the files in the deployment share and change the width of that window.

Leave a Reply

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

© trekker.net