Jump to content


Gregory B

How to retrieve the smstslogs During OSD

Recommended Posts

Hello,

 

This is my first topic, so I would like to share a simple way to retrieve the smstslogs automatically during an OSD TS.

 

Sometime, we can't stay in front of the computer during the TS, so, it's interesting to retrieve the logs on a share. We can do this by adding a group of tasks at the end of the TS like this :

 

post-11592-0-77565900-1325061553_thumb.jpg

 

Then, We are going to add a task in general category "Connect to Network Folder" :

 

post-11592-0-21777100-1325061554_thumb.jpg

 

You'll have to parameter the network folder path, the letter of the drive network path ("M:" in this example), and the account.

 

Next step, we are going to use the TS Variable %_SMSTSMachineName% to create a folder in the network folder. The folder will have the name of the computer we are deploying :

 

post-11592-0-69880600-1325061554_thumb.jpg.

 

For the last step, we are going to copy the logs to the folder with the command : "cmd.exe /c copy %_SMSTSLogPath% M:\%_SMSTSMachineName%" :

 

post-11592-0-17485700-1325061555_thumb.jpg

 

Before to advertise the TS, we have to check that every groups of the TS have the option "Continue on error" checked.

 

At the end of your deployment (in error or not), you can check the logs.

 

Hope that will help you.

 

Gregory B

  • Like 3

Share this post


Link to post
Share on other sites


nice post, i'll pin it ! keep it up :)

Share this post


Link to post
Share on other sites

Make sure to use %OSDComputerName% instead of %_SMSTSMachineName%. Otherwise you will get a lot of MININT folder names.

Share this post


Link to post
Share on other sites

Make sure to use %OSDComputerName% instead of %_SMSTSMachineName%. Otherwise you will get a lot of MININT folder names.

Shouldn't be necessary, as _SMSTSMachineName just represends the up-to-date machinename through the whole task sequence...

 

Someting totally different, in case somebody just wants the logs of a failed task sequence, see: http://www.petervanderwoude.nl/post/copy-logs-from-a-failed-task-sequence-in-configmgr-2007/

Share this post


Link to post
Share on other sites

Hmm, I've tried your steps, Gregory B, and I end up with a folder titled "%_SMTSMachineName%" in the network share I specified.

 

Did I do something wrong?

 

I linked the commands using an Ampersand operator like this

 

cmd.exe /c md M:\%_SMTSMachineName% & copy %_SMSTSLogPath% M:\%_SMSTSMachineName%

 

Furthermore, when I try the command manually from a diagnostic command prompt (I hit F8 while the Task Sequence is running), I don't see either %_SMSTSLogPath% or %_SMSTSMachineName% as Variables. They aren't listed under Set, and I can't expand them using Echo.

Share this post


Link to post
Share on other sites

This is an old topic, but i am trying to use during in place upgrade TS and having some issues.

When i run this command:

cmd.exe /c robocopy /mir /z %_smstslogpath% m:\%_smstsmachinename% /copy:dt /NFL /NDL

The %_smstslogpath% is resolving to "c:\windows\sysWOW64\ccm\logs\Smstslog"

However that directory does not exists, I only have "c:\windows\sysWOW64\ccm\logs" at that point.

So my xcopy is failing with exit code 3. Is there any way to use that variable or should i hard code it to c:\windows\ccm\logs?

Thank you.

OSD PHASE SMSTS.LOG LOCATION
WinPE, Before HD Format x:\windows\temp\smstslog\smsts.log
WinPE, After HD Format x:\smstslog\smsts.log
Windows, No SCCM Client Installed c:\_SMSTaskSequence\Logs\Smstslog\smsts.log
Windows x86, SCCM Client Installed c:\windows\system32\ccm\logs\Smstslog\smsts.log
Windows x64, SCCM Client Installed c:\windows\sysWOW64\ccm\logs\Smstslog\smsts.log
Task Sequence Completed x86 c:\windows\system32\ccm\logs\smsts.log
Task Sequence Completed x64 c:\windows\sysWOW64\ccm\logs\smsts.log

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...