copy the smsts log files to a share(SCCM server) if Task sequence Fails in deploying OS

It is difficult to troubleshoot the machines where the Task sequence(Os deployment) failed remotely.If there are one or two computers which are in front of you,you can check press F8 and see what happens by looking at smsts.log but take a case if you deploy to multiple systems and a person who is not know how to get smsts.log .Steve posted a Great blog on how to capture smsts.log on to share for further troubleshooting.

Below is the Task sequence which displays for deploying Operating System with different tasks .Here i have two main groups i.e Error catching Top with continue on error enabled(under options) –>This has all the tasks which are required to execute on the client side

other is Error catching Group ( No need to enable continue on error) set to run when task sequence variable _SMSTSLastActionSucceeded equals FALSE. This group will only start when the top group has failed.

If the Task sequence is succeeded(without any failures),you will not see any logs on the created share path.

If any of the task under Error Catching Top failed, It creates a folder with machine name(MININT-2KTGR4) in \\in-glim-syscm\logs share by copying smsts.log.You can edit the task sequence for the failure and advertise it again.Next time,TS verifies to see if there are any existing folders available for the current machine and deletes all the content available and recreate it again.

TS

Command lines used for Error Catching Group are :

for erase any pre-existing folder for machine-->cmd.exe /c rd /s /q t:\%_smstsmachinename%

create a log folder for current machine-->cmd.exe /c md t:\%_smstsmachinename%

copy logs to folder-->cmd.exe /c copy %_smstslogpath%\*.* t:\%_smstsmachinename%

Where T is Drive letter which i used to connect.

Post Comment