Back to Basic – CustomSettings.ini – Sample 3 and a bunch more

Customsettings.ini is one of those text files in MDT/ConfigMgr that has a major impact on the solution, badly written the solution is a pain in the… correctly written and it works like magic…

A while back I created sample package, but I only published 2 of the samples in the package and now it is time for the rest of them:

  • Disable OSInstall.ini
  • Setting based on Computer type and location.ini
  • Settings based on Computer type.ini
  • Settings based on Default Gateway.ini
  • Settings based on MAC for servers.ini
  • Settings based on MAC.ini
  • Settings based on Model.ini
  • Settings based on TaskSequenceID.ini
  • Settings based on UserExit-Alias.ini
  • Settings based on VB Calculation.ini
  • Settings based on Virtual Machines.ini
  • Settings for UDI.ini
  • Using the SMSTSOrg.ini

To try them out in your environment you can just run:

cscript.exe “Path to your MDT folder”:\Scripts\ZTIGather.wsf /Inifile:”The Path to the .ini file you would like to test”

You can download the samples here:

(Note all these files has been made upon request from customers, so if you need one that I down have, ask me…)


Categories: Deployment, MDT

Tagged as:

21 replies »

  1. Hello Mike

    Is it possible to use the customsettings.ini to add sequential numbers at the end of the OSDCOMPUTERNAME instead of the SN or MAC address? I have a customer who I wont to use all the other steps for but they just wont:


    then 000501,000502 ect

    hope this makes sense!

    and thanks for all of the samples here and on other posts!


  2. Hello Mike

    Iv had the chat with the customer and we are now going with the SN at the end of the name ;-)
    Thanks again for your advice and time!


    • Hello again Mike

      Are all the above customsettings.ini supported in sccm sp1 please? Im testing now but would be good to know if any are not to save my time :-)

      Thanks Again


      • Some of them are, some of them not. If you open the MDT helpfile. You can search for each of these properties and they will tell you if the are supported in TLI or ZTI (ZTI = ConfigMgr+MDT)

      • Hello Mike

        Just wonted to share with you what I had done :-) as I would have completed it without your help:

        Priority=ByLaptopType, ByDesktopType, ByVMType, ByServerType, DefaultGateway, Default
        Properties=MyCustomProperty, NameByType



        TimeZoneName=Eastern Standard Time

        TimeZoneName=Eastern Standard Time









        As I am using SCCM with MDT I then used the TS to add the different regional machines to the correct OU’s. I did this by having multiple network settings added to my TS with the correct OU structures in and used TS variable “OSDCOMPUTERNAME” to put the corresponding machine in there OU.

        Hope this makes sense!

        Again thanks for your help and time!


  3. the last post should have said “as I wouldn’t have completed it without your help”!!!


  4. I have been reading over methods like this for renaming systems during deployment. I wanted to ask if there is a way to prompt for input because of user type for the name. Currently, in production I have MDT 2010 and use VBS scripts to rename and join the domain and it works fine.

    I have a test server with MDT 2013 and wanted to see if I can change the method. The reason for the prompt is because the systems are named based off the user ie Teacher or Student. I have a naming convention of W7T-serial number (Teacher) or W7S-serial number (Student). I need the prompt because I have no way to tell what type of user they will be. I also have a secondary issue with the serial number because not all vendors have the serial number listed in WMI commands. Dell, HP etc are ok but there are also off brands that have those fields blank. Wish I had a single vendor shop.

    Would like to hear if anyone has ran into a request like this and if there are any suggestions. Thank you.

    • Thereare customers that cannont find a common key to get from the system to generate the name. For Lite Touch that means that theese customers will use the Wizard and/or in combinaton use the database. ForZero Touch customers, they could use the UDI wizard and/r in combination with the database, or prestage in ConfigMgr

      • Mikael, Thanks for the information on this and other great stuff on this site. I have used information here to get the naming issue resolved.

        I had an additional question regarding the DefaultGateway in customsettings.ini. I wanted to use the default gateway to assign the site location but I wanted to use a variable for the 3rd octet. I have tried looking for this and using the common wildcards but nothing has worked so far. I have used .*, .x, .xxx, .% etc. already.




        I have logging enabled so I can see the wildcard does not work. This is a sample of the log.

        The reason I need a variable is some of the sites have multiple gateways so I don’t know what the 3rd octet will be at each site. I also did not want to have to hard code multiples into each entry because it would bloat the cs.ini. So is there a way to put in a variable or would I have to call a script or use a database? A variable would be much quicker for me. Thank you again for your knowledge and this site.

  5. Older thread I know, but what if you have multiple default gateways for each office location? Right now I use collection variables, and have the technicians pick a location – then use that variable to determine what OU the computer goes into, timezone, specific applications, etc. It seems like if I move this to customsettings.ini, I could potentially take any potential error by the techs out of the equation.

      • Thanks Mike. On the device collection for OSD, I setup a blank variable for each location – LOC_NewYork for example. At the beginning of the task sequence, the support technician double clicks on the appropriate location and enters a Y. Steps in the actual task sequence are then run based on that criteria – If LOC_NewYork=Y, then run this step…This is primarily used for the Apply Network Settings step, as each location has a specific OU for computer accounts. It’s also used for applications that are only applied in certain locations, or for applications that have different command lines depending on the location. As for the locations themselves, each has several VLans. The techs usually image in a set location, but have been known to reimage a device at a user’s desk if needed, so I need to allow that to happen. The problem with the task sequence variables are the techs themselves – if they forget to add the Y, or accidentally use a lower case y, the task sequence fails. Let me know if you want more details. I can email screen shots if needed.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.