Operating System Deployment Logs

I love a good logfile and operating system deployment (OSD) has a whole bunch of useful logs. The log files created during OSD are vital for troubleshooting. I come across many customers who get several OSD failures in remote sites, they really battle to troubleshoot the issues and it can be challenging to get hold of the logs.

The Microsoft Deployment Toolkit (MDT) has a great script that can save loads of time, zticopylogs.wsf. Using the task sequence variable SLShare and this script you can get the OSD logs copied to a network share when a build failures or when a build completes.

The process below copies the log files from C:\Windows\CCM\Logs\SMSTSLog to the location set by SLShare and the domain join logs from C:\Windows\Pather folder.

I find it really useful to also have a few other log files copied to the SLShare location. By copying the following log files to C:\Windows\CCM\Logs\SMSTSLog before the Copy Logs task sequence step the logs will be copied to the SLShare for review and troubleshooting.

  • log – ConfigMgr Package installation
  • AppDiscovery – ConfigMgr Application installation requirement assessment
  • AppEnforce – ConfigMgr Application installations

Step 1. Create a network share

I tend to use a single central network share on the Primary or CAS. The share will need to writeable by the everyone built-in group.

Step 2. Continue on Error

Set the first group of the task sequence to continue on error, this will ensure that if the task sequence fails the logs will get copied.
operating system deployment logs_1

 

Step 3. Set SLShare

Set the SLShare variable that is used by the zticopylogs script.

operating system deployment logs_2

 

Step 4. Use MDT Toolkit

The deployroot variable is create by this step and the scripts are copied to C:\_SMSTaskSeqeunce\WDSPackage

operating system deployment logs_3

 

Step 5. Check for a failure

The group will only run if there was a task sequence failure.

operating system deployment logs_4

 

Step 6. Copy Useful Logs

This command line will copy the useful logs to C:\Windows\CCM\Logs\SMSTSLog

Cmd /c copy C:\Windows\CCM\Logs\AppEnforce.log C:\Windows\CCM\Logs\SMSTSLog\ & copy C:\Windows\CCM\Logs\AppDiscovery.log C:\Windows\CCM\Logs\SMSTSLog\ & copy C:\Windows\CCM\Logs\ExecMgr.log.log C:\Windows\CCM\Logs\SMSTSLog\

operating system deployment logs_5

 

operating system deployment logs_6
 

Step 7. Copy the logs

Runs the command: cscript “%deployroot%\scripts\zticopylogs.wsf”

operating system deployment logs_7

 

Step 8. Go view the logs

A folder is created using the OSDComputerName variable and the logs are copied in.

operating system deployment logs_8

 

SHARE
Peter Clark
Peter Clark has extensive experience in consulting roles focused on Microsoft SMS, ConfigMgr and desktop migration, deployment and management. He has worked with many large customers in the UK, Europe, America, South Africa and Australia designing and deploying 1E solutions. Previously, he worked at BBC Worldwide managing their global desktop environment from group policy to desktop deployment and everything in-between.