Answered Redirect MDT Log Directory

  • Friday, February 15, 2013 7:08 PM
     
     

    I am looking to move the location of the deployment logs after a server deployment has finished.

    One thing we are looking to do is automate cleaning up c:\windows\temp which contains the DeploymentLogs.

    How can I redirect these to say:


    C:\ServerAdmin\DeploymentLogs

    Thank You.

    Graeme



All Replies

  • Friday, February 15, 2013 8:33 PM
     
     

    How about redirecting them to network share.  In this way you have central location for storing and reviewing logs?  There is a property called SLShare you can use... something like this.

    SLShare = The network shared folder in which the deployment logs are stored at the end of the deployment process.

    [Default]

    DeployRoot=\\NYC-AM-FIL-01\Distribution$

    ResourceRoot=\\NYC-AM-FIL-01\Resource$

    UDShare=\\NYC-AM-FIL-01\MigData$

    UDDir=%OSDComputerName

    SLShare=\\NYC-AM-FIL-01\Logs$


    Dave Guenthner [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights. http://blogs.technet.com/b/davguents_blog


  • Friday, February 15, 2013 9:29 PM
     
     
    I would also recommend this method of deployment log management. I prefer to have everything centralized. You can also use tools like Trace32 to follow the BDD.log live during a deployment. 
  • Friday, February 15, 2013 10:17 PM
     
     
    I do this, however I want to maintain the log directory on the local server as well.  This way we can perform an audit and see what was installed during the build if it happens to be 3 years down the road.
  • Sunday, February 17, 2013 9:31 AM
     
     

    Try using

    SLShare=\\localhost\users\serveradmin\Logs$

    and

    SLShareDynamicLogging=\\server\Logs$

    or

    vice verse

    best regards



    • Edited by Code 46 Sunday, February 17, 2013 9:32 AM
    • Edited by Code 46 Sunday, February 17, 2013 9:33 AM
    •  
  • Sunday, February 17, 2013 10:30 PM
     
     Answered

    Since moving the logs is the last thing the task sequence does after all the other steps are done, the only way to move the logs using the task sequence is to use a user exit script. The user exit script fires off after the task sequence is done, and should let you copy the logs out of temp to another location.

    Johan has one here:

    http://deploymentresearch.com/Blog/tabid/62/EntryId/17/Final-Configuration-for-MDT-2010-Lite-Touch.aspx

    Barring that, you'd need to edit the task sequence scripts to use another location during clean up. It is a good rule of thumb not to modify the stock scripts, as they could be over written if you ever update or re-install MDT.

    • Marked As Answer by Graeme Bray Wednesday, February 20, 2013 2:36 PM
    •  
  • Monday, February 18, 2013 8:51 AM
     
     Answered

    As JoeZeppy said, not a good !dea to change anything in the existing scripts. If this is still a requirement - You could edit the LTICleanup.wsf under scripts folder. Change the "sArchiveDir = sSystemDrive & "\Windows\MDTlogs" (In bold below).

    ========================
    If oEnvironment.Item("OSVersion") = "WinPE" then
    sArchiveDir = sSystemDrive & "\WINDOWS\TEMP"
    Else
    If sSystemDrive = oEnv("SystemDrive") then
    sArchiveDir = oEnv("SystemRoot") & "\TEMP"
    Else
    sArchiveDir = sSystemDrive & "\WINDOWS\TEMP"
    End if
    End if

    ==========================


    Regards, Vik Singh "If this thread answered your question, please click on "Mark as Answer"

    • Proposed As Answer by Code 46 Wednesday, February 20, 2013 6:03 AM
    • Marked As Answer by Graeme Bray Wednesday, February 20, 2013 2:35 PM
    •  
  • Wednesday, February 20, 2013 2:35 PM
     
     

    Vik/JoeZeppy,

    This is what I was looking for.  Thank you.