Step by Step Directions for Techs

Category Archives: MDT

Timestamp USB drives used in deployment

I have found that when testing MDT deployments, I end up with a lot of USB drives and people asking for them to be updated. Inevitably, someone uses an old one to image and the complaints come rolling in.

This is a simple script that creates a file with a name that is a time stamp. That way, I know when I created the media.

REM mmddyyyy
For /F “tokens=2-4 delims=/ ” %%a in (“%DATE%”) DO SET MDY=%%a%%b%%c
REM hhdd
FOR /F “tokens=1,2 delims=:” %%d in (“%TIME%”) DO SET ORAS=%%d%%e

REM output to file
echo TimeStampFile > \\servername\sharename\%MDY%_%ORAS%.txt


I save the file to the share that MDT copies the media to. That is done in the last time with \\servername\sharename. It produces a TXT file with the date and time in it. Right now it is Jan 20th, 2014 at 10:23 AM. The file name is 01202014_1023.txt.

Works great. Less filling.


Get your USB drive bootable and ready to image with MDT

It isn’t hard, but you have to do a few things to prep a USB drive for use in imaging with MDT.  You need to mark the partition as active and you need to make sure it is formatted for NTFS.

  1. Plug in the USB drive.
  2. Click Start | Run
  3. Type “CMD”
  4. Press “OK”
  5. Type “diskpart” into the command prompt and press the enter key
  6. Type “list disk” and press the enter key.  This will list the available drives
  7. Determine which disk number is your USB drive (you can frequently tell by size).  If you are unable to determine it, unplug the drive and list the disks again to see which one is missing.  Plug it back in and list them again.  You should be able to figure it out by the differences.
  8. Type “select disk 1” (or whatever your disk was as determined above) and press the enter key.
  9. Type “list partition” and press the enter key to list the partions.
  10. Type “select partition 1” and press the enter key
  11. Type “active” and press the enter key

Here is the output from my window:


You then need to format the drive as NTFS.  You can do it here by:

  1. Type “format fs=ntfs QUICK” and press the enter key inside of diskpart. 
  2. You can do it through disk manager and do a quick format.

Type “Exit” to leave the DISKPART tool.

Now, you just need to copy the contents of your MDT content folder to the drive and you are set!  Don’t forget to boot off of it (by setting the BIOS or choosing an alternative boot device).

If you are using a SANDisk, you may need to do one more thing.  You need to get a copy of BOOTSEC (available in WAIK).  Open a command prompt and execute “Bootsect.exe /nt60 D:” (where D: is your USB drive) from the directory you put BOOTSEC into.

Happy imaging!