Storing log files within MDT 2010
So I wanted to know what was going on and what part my deployment was in, so I did some research and it seems that MDT 2010 could capture *.log files. You have two options one to log the files centrally or two on a network share. In my case, I stored the logs on a network share [Linux box]. Log capturing is great because if something goes wrong your could look at the log and troubleshoot from there.
There are 2 types of logging available. The first is standard logging – which stores the logs on a network share at the end of a deployment. This is cool, but you have to wait at the end to see if stuff failed. The second is dynamic logging – which writes the log files in real-time to a network\central share throughout the deployment process. This option was great, because you could use Trace32 and view everything live; especially if you have Windows Update enable in your Task Sequence this shows you what is being pushed out.
Setting this up:
note:[I’m using the IP address of the server because when I used the computer name of the server I received several errors in connection when i placed the IP all errors disappeared]
Open up your customsettings.ini and enter one of these properties. In this example of standard logging, the log files are copied to a share at the end of the deployment process:
SLShare=\\192.168.1.0\Logs
This example shows dynamic logging, where the log files are copied in real-time to a share throughout the deployment process: [this is cool if you are using Trace32 to open the logs up and see everything happen “Live”]
SLShareDynamicLogging=\\192.168.1.0\Logs
In most cases you can just create a folder called logs in the deployment share itself and target that location for your logs:
SLShareDynamicLogging=\\192.168.1.0\DeploymentShare$\Logs
[I won’t recommend this because you have enough traffic going to your MDT server
Here is an example of a Log file:
If this post helped you, PLEASE take the time to +1 it.
I did it this way:
In customsettings.ini add
SLShareDynamicLogging=\\server\logshare\%OSDComputerName%
In the TaskSequence, add a Run Command Line item (as the very last item):
powershell.exe -executionpolicy bypass -file “%SCRIPTROOT%\Rename-BddLog.ps1” %OSDComputerName%
Ihe PowerShell script (DeploymentShare\Scripts\Rename-BddLog.ps1):
*************************************************
Param (
[Parameter(Position=1)][string]$ComputerName
)
#Determine date-time
$Now = Get-Date -Format “yyyyMMdd-HHmm”
#Rename log
Rename-Item -Path (“\\server\logshare\”+$ComputerName+”\BDD.log”) -NewName (“BDD-“+$Now+”.log”)
**************************************************
Regards, Martin
awesome tip on this. thanks for sharing 🙂
Thanks for the vid – do you know of any way to rename BDD.log to something like the machine name or serial number?
hmmm. good question, i normally do it by machine name but with a folder and inside the folder there is the BDD.log file. I have to do some research on my lab for your request