SCCM Troubleshooting

Copy SMSTS log file during Task Sequence Failure

How to copy SMSTS log file during Task Sequence Failure – When you are deploying OS using SCCM there are chances that your deployment might fail. You see that your task sequence fails with an error code. The next step that you do is find out why the deployment failed. The error code is always important to understand why the deployment failed.

But unfortunately not all error codes reveal the exact issue. You need to dig in much deeper and look at the log files to understand why your Task Sequence failed. One of the basic log file that helps you in OSD troubleshooting is SMSTS.log file. This file changes it’s location as the task sequence progresses. Here is a list of all the SCCM log files.

How to copy SMSTS log file during Task Sequence Failure

Once you find out the location of SMSTS log file, the next step is to open it and check for the errors. You could bring up command prompt by pressing F8 key during OSD. Then use the cmtrace command to bring up the log viewer. However it would be cool to copy the SMSTS log file during the task sequence failure. You could copy the log files to a shared folder on a remote computer. This will make your task easier as you get time to analyze the log files and it is much faster (compared to accessing the same file during OSD).

So in the below screenshot my task sequence has failed with error code 0x80070002. I have brought up the command prompt by pressing F8 key. I can now launch the cmtrace tool from the command prompt and read the log files. But instead of that we will see how to copy those to a shared location.

Copy SMSTS log file during Task Sequence FailureFirst identify the location of smsts.log file. In the below screenshot I have got two log files that I would be copying it to a folder/drive .

Copy SMSTS log file during Task Sequence Failure Snap2To copy the log files use the command (syntax) :-

net use letter: \\servername\drive$ /user:domain\username password

Copy SMSTS log file during Task Sequence Failure Snap3If the credentials are correct, you should see the command completed successfully line. The next step is to copy the files. Use the command copy smsts.log driveletter:

Once the files are copied, you should find them on the destination drive. Copy SMSTS log file during Task Sequence Failure

Prajwal Desai

Hi, I am Prajwal Desai. For last few years I have been working on multiple technologies such as SCCM / Configuration Manager, Intune, Azure, Security etc. I created this site so that I can share valuable information with everyone.

Related Articles

8 Comments

  1. Hi Prajwal, Is there a script where we can copy the log files of only failed task sequence to Azure Blob ..

  2. Hello, I have an OSD task sequence that is freezing while running a PowerShell script (Modern Driver Mgmt). When I try the above method to grab the logs, I get an ‘Access is denied’ because the log files are in use. Is there another method that would allow me to check the smsts.log even if it is locked or in use?

  3. You would think that stupid Microsoft would make SCCM copy these logs to the server so that you can easily access them. But now, I guess they’re too stupid to think of that…
    I have a failing task sequence that leaves absolutely no logs on the machine after the task sequence finishes, so, unless I do F8 I lose all logs. How helpful…

  4. Hi Prajwal, will much appreciate if you can share how can we automatically copy logs folder/files to a central location right before the TS fail? Will be good to know how to do this with and without MDT ? Sorry if I’m to demanding 🙂

  5. Any thoughts on what to do if F8 Doesn’t bring up command prompt? I have Command support checked in the boot image on both 32/64.

Leave a Reply

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

Back to top button