A Week of Task Sequence Tips - Day 04 - SMSTS Log Stamping

You made it, Hump Task Sequence Tip Day! So let's go with a profoundly simple but helpful tip. You ever open up the SMSTS log file and be like... what am I looking at? What deployment was this? Where is the deployment I want to look at? Then you have to dig through the execmgr log to find when the package id and deployment id were triggered so you can then look at the time stamps in the smsts log file to find the deployment in question.

Here are a couple tips to help with this:

  • Start a new SMSTS Log
  • Stamp the SMSTS Log

When I trigger an upgrade, one of the first steps I do, is rename the current c:\windows\ccm\logs\smsts.log file to smsts[TIMESTAMP].log

Simple step near start of TS that renames smsts.log
%windir%\System32\WindowsPowerShell\v1.0\powershell.exe -command "Rename-Item -Path C:\Windows\CCM\Logs\smsts.log -NewName smsts$(get-date -Format yyyyMMddhhmmss).log -Force"

Now I know the smsts.log file will only be from the last upgrade (unless I've run additional deployments since), which is when this next tip comes in handy.

The next Trick I use is to stamp the SMSTS Log... what does that mean?  Well, wouldn't it be nice to easily find where you started your Task Sequence, and some generic info about the computer and which deployment was running? Yes, yes it would.

Run PowerShell Script Step

Output in the SMSTS.log looks like:

Output from the script.

Isn't that nifty? Info about the TS Name, and Deployment, along with basic computer info at the time you started the TS. Also, don't you like the use of the word "Fail" to create a nice Red Border to make it easier to find? :-)

Script: Hosted on GitHub

Let us know Questions or Comments! @RecastSoftware

See more tips:

Day 01 - Tag Version in Description

Day 02 - Task Sequence Pause

Day 03 - Variables Gather and Capture