SLShare=\\servername\share\
SLShareDynamicLogging=\\servername\share
I put them under MDT$/Logs (I use this share name vs the default DeploymentShare$ share) but they can go to any UNC path on the network that the MDT account can access. It will create a subfolder and put BDD.Log etc in it. Andrew Barnes has a great article on it.
As we quickly found, the folder started filling up so I gave him this simple shell script to keep it clean. Its ran as a scheduled task at 5AM each day to delete any logs older than 60 days. Change /P to the local path of the logs and /D to the days to delete, note the negative number. Then remove the 'echo' so it has teeth. Otherwise, it just outputs what it wants to do.
::Written by Kevin Fason
:: This simple script will clean the MDT Logs folder of logs older then 60 days.
:: V1.0
:: 04.09.2013
@ECHO OFF
ForFiles /P "D:\MDT\DeploymentShare\Logs" /D -60 /C "CMD /C if @ISDIR==TRUE echo RD /Q @FILE &RD /Q /S @FILE"
It can be run directly within the scheduled task but I did it in a shell script so its easier to update. To use for other stuff such as deleting just files you can change the cmd/c to soemthing like '"CMD /C DEL @FILE"'.
No comments:
Post a Comment