If you have changed the default values for LogMaxSize and LogMaxHistory in your SMSTS.ini in your boot media, some of you might have experienced that these values gets reset to their default values (1000000 and 1) during a refresh scenario.

This causes us to loose build history and makes troubleshooting quite difficult as logs are incomplete.

Well, our friends over at E1 have created a nifty little tool that you can use to overcome this issue.

The tool will change the following variables that controls the log behavior, these are normally read-only and can not be changed the way we normally change task sequence variables.

  • _SMSTSLogMaxSize
  • _SMSTSLogMaxHistory

How to use the tool

To use the tool you will have to download the tool from 1Es website, extract the files and add them to your MDT toolkit package. There are 2 files, one for each architecture.

Place the files in the <MDT Package source>\Tools\x86 and <MDT Package source>\Tools\x64

Remember to update your Distribution Points when done!

2014-12-04 07_50_19-CM2012R2-CM01 on CTHRA-W530 - Virtual Machine Connection

Now in your task sequence, add a Run command line step just after the first Gather step, while still in the old OS.

  • Command Line : “%toolroot%\SetSMSTSLog.exe” LogMaxSize=1572864 LogMaxHistory=2 (replace values as you se fit).

2014-12-04 09_04_55-CM2012R2-CM01 on CTHRA-W530 - Virtual Machine Connection

Now add the following condition to avoid running while in WinPE.

  • Task Sequence Variable _SMSTSinWinPE equals FALSE

2014-12-04 09_12_21-CM2012R2-CM01 on CTHRA-W530 - Virtual Machine Connection

Add the same values to the Configuration Manager Client Package step


2014-12-04 09_06_21-CM2012R2-CM01 on CTHRA-W530 - Virtual Machine Connection

Voila! now you have full logging again, and your troubleshooting life should be much easier!!

Thanks goes out to Mike Terrill at 1E for creating this little tool.

Download the tool here: http://www.1e.com/free-tools/ (1E SET SMSTS LOG)