question

BESANONLudovic-0972 avatar image
0 Votes"
BESANONLudovic-0972 asked SimonRenMSFT-3639 commented

My MDT is better than yours ! Isn'it ?

Bonjour,

J’aimerais permettre une amélioration de MDT !
Lorsque le déploiement d’un PC est terminé, les logs sont transférés dans le dossier logs du serveur MDT dans un dossier portant le nom du PC déployé.
Cependant il m’arrive, pour mes machines de test notamment, de redéployer le même PC plusieurs fois.
Et alors les logs se concatènent. Ce qui ne facilite pas la recherche d’informations.
J’aimerais que le script renomme le dossier s’il existe, permettant ainsi d’avoir des dossiers complets mais exhaustifs.
Une façon que j’aime bien de renommer est d’ajouter .nnn au nom du dossier, en commençant par .000 et en incrémentant d’1 si nécessaire.

Hi,

I would like to get better MDT.
When a deployment ended, logs are copied in the logs folder on the MDT server in a folder named with the hostname of the PC deployed.
But, for my test PC, I deploy more than once the same PC.
And then logs are added. This is not friendly to get information.
I would like that the right script rename the folder if it exists, so we got only one deployment by folder.
A way that I like to rename is to add .nnn to the name of the folder, beginning with .000 and add 1 if necessary.


J’ai remplacé

     sNewLogFolderName = oEnvironment.Item("SLShare") & "\" & sComputer
     oUtility.VerifyPathExists sNewLogFolderName

Par :

     sNewLogFolderName = oEnvironment.Item("SLShare") & "\" & sComputer
     If oFSO.FolderExists(sNewLogFolderName) then
         i = -1
         Do While oFSO.FolderExists(sNewLogFolderName)
             sNewLogFolderNameBad = sNewLogFolderName
             oLogging.CreateEntry "Ludo : Le dossier " & sNewLogFolderNameBad & " existe.", LogTypeWarning
             i = i + 1
             sNewLogFolderName = oEnvironment.Item("SLShare") & "\" & sComputer & "." & Right("000" & i, 3)
         Loop
         oFSO.MoveFolder oEnvironment.Item("SLShare") & "\" & sComputer, sNewLogFolderName
         oLogging.CreateEntry "Ludo : Renommage du doosier " & oEnvironment.Item("SLShare") & "\" & sComputer & " en " & sNewLogFolderName, LogTypeWarning
     End if
     sNewLogFolderName = oEnvironment.Item("SLShare") & "\" & sComputer
     oUtility.VerifyPathExists sNewLogFolderName

Et j’ai ajouté

     Dim i, sNewLogFolderNameBad



Thank you for your comment.

Ludovic.

mem-mdt
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

Thank you very much for sharing! I think maybe other peoples with the same needs will benefit from it. Your solid technical skills are really impressive.

Have a nice day!

Best regards,
Simon

0 Votes 0 ·

0 Answers