locked
MDT and logging RRS feed

  • Question

  • I have enabled monitoring from MDT deployment share. It works great, but I would like to get more information written to Windows log.

    When I start to install machine MDT writes event 41016 to eventviewer

    Deployment started for computer %OSDComputerName%

    I would need to add some more information to this event. Like make, model, serial number and tasksequenceID. 

    How can I get those values to log?


    Saturday, June 14, 2014 11:18 AM

Answers

  • 1. I do not recommend SLShareDynamicLogging except in the most *rare* of debugging scenarios. Not for generic status updates. <yuck>

    2. jqx12 - Please be aware that the "MDT Monitoring Service" is different than the "Windows Event Log". Your posts appear to use the two components as the same thing. They are not.

    a. There is no interface built into MDT To write to the "Windows Event Log".

    b. To write to the "MDT Monitoring Service" please use the oLogging.CreateEvent() function Like:

    oLogging.CreateEvent 410XX, LogTypeInfo, "Description", Array("Something","Something Else")
    Best to use the numeric range 41000 through 41050


    Keith Garner - Principal Consultant [owner] - http://DeploymentLive.com

    Wednesday, June 18, 2014 1:31 AM

All replies

  • Did you already check the bdd.log file which is present on every machine during deployment?

    It can be found after a deployment has been finished in C:\Windows\Temp\Deploymentlogs, or you paste the following line in your cs.ini:

    SLShareDynamicLogging=%DeployRoot%\Logs\%COMPUTERNAME%

    This will copy the bdd.log for every deployment right back to the deploymentshare in the logsfolder, and create a subfolder for each log file, which wil start with: MININT-<random number/name> or the hostname of the machine, if the names are coming out of a database connected with MDT.

    Cheers!


    If this post is helpful please click "Mark for answer", thanks! Kind regards

    Saturday, June 14, 2014 5:24 PM
  • Thanks but I know that and I'm already using it.  Problem is that there is so much information and every machine has own log file. I'm looking a single view where I can get all the information I need and if I'm able to get the information to eventlog, I'm able to view it from custom build web page that reads those events generated by MDT_monitor.




    • Edited by jqx12 Saturday, June 14, 2014 6:12 PM
    Saturday, June 14, 2014 6:04 PM
  • there isn't any. You'll need to build something yourself.

    If this post is helpful please click "Mark for answer", thanks! Kind regards

    Saturday, June 14, 2014 6:16 PM
  • I think the answer is oLogging.CreateEvent(iEventID, iType, sMessage, arrParms). For some reason I haven't been able to get it write to eventlog.
    Saturday, June 14, 2014 6:33 PM
  • I would just do something like this in powershell -

    $tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment 
    
    $logPath = $tsenv.Value("_SMSTSLogPath")
    
    $computersystem = get-wmiobject win32_computersystem
    
    add-content $logpath\$env:osdcomputername\bdd.log "`nManufacturer = $computersystem.manufacturer, Model = $computersystem.model, Name = $computersystem.name"

    Though I'm pretty sure it was Rens blog post I read on how to write directly to the bdd.log :) ... 

    Anyways the point is you can write a small script and call it during the PE phase and write whatever information you want to it.   I use this for log consolidation when adding installs and etc and want to get my exit codes quickly.  Also note that the info you want is up near the top of the log when WinPE first boots, it will populate all of this system info.  Good luck.


    • Edited by MrBrooks Tuesday, June 17, 2014 2:38 PM
    Tuesday, June 17, 2014 2:38 PM
  • 1. I do not recommend SLShareDynamicLogging except in the most *rare* of debugging scenarios. Not for generic status updates. <yuck>

    2. jqx12 - Please be aware that the "MDT Monitoring Service" is different than the "Windows Event Log". Your posts appear to use the two components as the same thing. They are not.

    a. There is no interface built into MDT To write to the "Windows Event Log".

    b. To write to the "MDT Monitoring Service" please use the oLogging.CreateEvent() function Like:

    oLogging.CreateEvent 410XX, LogTypeInfo, "Description", Array("Something","Something Else")
    Best to use the numeric range 41000 through 41050


    Keith Garner - Principal Consultant [owner] - http://DeploymentLive.com

    Wednesday, June 18, 2014 1:31 AM
  • Whatever works best for you Keith.  I've never had issues with the add-content cmdlet. It's nice to see the actual parameters for the ologging function.  
    Wednesday, June 18, 2014 8:06 PM