Chris Nackers Blog

ConfigMgr and MDT Deployment Solutions

Useful Blogs

User Groups

Script to move OSD Logs (MININT Folder)

I have been working on a custom script to move the OSD logs up to the server after a deployment.  If you have the debug option enabled, the logs stay after a deployment, then having the MININT folder doesn't allow you to do a new build until that folder is removed, unless you do a ZTI through SMS.  So i wanted to have a way to upload the logs to the server before they are wiped and to be to review all the logs, not just the BDD.log, and i posted on the forums and was graciously given this link:

http://blogs.msdn.com/steverac/archive/2008/07/15/capturing-logs-during-failed-task-sequence-execution.aspx

I built off of this and created my own custom tasks for MDT 2008 with SMS 2003.  The information above is mostly for SCCM, but it gave me a start.

Here is a screenshot of my TS steps.  I just put it on the end of everything, but I might move it around if need be, but for testing purposes this worked.

I haven’t taken my debug switch off quite yet, but at least my logs are being copied up to the server now.  I’ll have to see if i can have that step there or if i need to move it around once i take the debug switch off.

Update: I removed the /debug:true from the OSD Program and did some testing and everything seems to be working great. So I no longer have a MININT folder left on the C: drive, and i have a copy of all the logs i need under my log share on the DP.

 

image

The command lines i used are:

Make Log Folder

cmd.exe /c mkdir "%SLSHARE%\%COMPUTERNAME%"

Copy Logs to Server

cmd.exe /c copy "C:\MININT\SMSOSD\OSDLOGS\*.log" %SLSHARE%\%COMPUTERNAME%

 

So basically i just created a custom command line step, and then i’m making use of the built-in TS variables to get the logs copied up to my "logs” share on my DP’s.  This allows for the logs to go to the correct server in my remote locations as well.

So far working great.

Comments

No Comments