Customize Disk Partitions in MDT

For most systems, I typically recommend using the primary disk’s full capacity as one partition, C:\, instead of creating multiple partitions/drive letters for end users. As an IT Pro, it makes it easier for me to find someone’s “stuff” if they store their data in a standard location like their default profile location, C:\Users\%username%\.  If all of your documents, pictures, shortcuts, Favorites, settings, etc. all live in the same place, I don’t have to go hunting for files when it’s time to migrate someone to a new machine.  (Or, better yet, I can automate it!)  For the end user, it’s just easier:  Most people are used to just saving files to the default locations on their home computers.  Any time you can keep the corporate computing experience similar to what people experience at home, it saves you time and money.

However, there are some times when it can be advantageous to create more than one partition when deploying an operating system (OS) to a computer.  I know quite a few people who actually prefer that their end users store their data on D:\ so that it can be fully separated from OS and applications on C:\.  In the event of an OS crash or malware infection that isn’t recoverable, C:\ can be wiped out and all of the user’s data on D:\ is still there.  Personally, I’m not a huge fan of that because it tends to miss application settings, the Registry hive, and other important things a user may miss later.  But, to each his own I guess.

I am, however, a fan of separating data from OS and software on servers.  I’m also a fan of keeping my virtual machines totally separate from C:\ also. (Those things have this bad habit of filling up disks, don’t they!?!)

How MDT Partitions Disks

The disk partitioning process is a task that is part of each OS deployment Task Sequence.  By default, MDT creates a C:\ partition using the full first disk and names it OSDisk.  If this default doesn’t work for your environment, it is pretty easy to change.

Change the Default Partition

In the MDT Deployment Workbench, go to Deployment Shares > $YourDeploymentShare > Task Sequences.  Find the Task Sequence you want to edit and right-click on it.  Click on Properties.


In the Task Sequence Properties, go to Preinstall > New Computer only > Format and Partition Disk.

01-custom_disk_partition_mdtIn the Volume section, you should see “OSDisk (Primary).”  Click on OSDisk (Primary) and then click the Edit button.  (The Edit button is the middle button that looks like a hand pointed at a document with a bulleted list.)

02-custom_disk_partition_mdtIn the Partition Properties, you can change the Partition name, the size, file system, etc.

03-custom_disk_partition_mdtFor our example, we’ll change the partition size to “Use specific size” and set it to 80 GB.  Once we’re done, click Ok.

I don’t want to waste the remaining disk space; so, we’ll add a second partition that uses the remaining space.  Back in the “Format and Partition Disk” task, click on the New button.  (The New button is the left-most button that looks like a yellow star.)

04-custom_disk_partition_mdtIn the Partition Properties, fill in the Partition name with “Data Disk,” and select the “Use a percentage of remaining free space.”  Set the Size (%) to 100.  Ensure the File system is set to NTFS and click Ok.

05-custom_disk_partition_mdtWhen you’re done, you should have something that looks like this:

06-custom_disk_partition_mdtIf we perform a test deployment, you should get an 80GB drive and a second with the remaining space.


13 thoughts on “Customize Disk Partitions in MDT

  1. CJ July 16, 2014 / 3:57 AM

    Hi Kyle, is it possible for me to choose the disk and the partition when the OS is deploying., this is because i have more than one disk in the computer. I would like to manually choose the destination disk.

    Thank you

    • Kyle Beckman July 19, 2014 / 6:07 PM

      You would need to create a custom wizard page to do that.

  2. Akın November 1, 2014 / 9:32 AM

    hi Kyle

    is there a example disk partition wizard script

    • Kyle Beckman November 9, 2014 / 3:25 PM

      I’m not totally sure what you’re asking for… The default behavior in MDT is to use the entire first disk as C:\. This article explains how to change that behavior.

  3. Norberto Gomes November 1, 2014 / 1:41 PM

    I would like to know how can I create a System Partition without Letter D assigned. How can I remove drive letter on deployment?

    • Kyle Beckman November 9, 2014 / 3:24 PM

      The system partition should automatically be getting C:\. What’s getting D:\ on your deployments?

  4. Barry November 14, 2014 / 10:16 AM

    This is exactly what I was looking for. Worked great! Thanks.

  5. kheenan halvorson May 22, 2015 / 2:38 PM

    ive tried this in multiple variations and it wont work with me, it fails to install the os,

  6. Danh September 22, 2015 / 4:30 AM

    Hi Kyle Beckman
    Could you show me how to solve this issue
    “A connection to the deployment share could not be made. The deployment will not proceed. The following networking device did not have a driver installed PCI\VEN_8086&DEV_10EA&SUBSYS_040B1028&REV_05.”

    I use MDT to deploy windows for many HP PC model: HP 8100 SFF, HP8300 SFF, HP G800 SFF. With the third model HPG800, everything work normally, but with HP8100 i can’t establish connect to “deployshare folder”.
    I tried to import the newest NIC driver on HP offical page, but still doesn’t work.
    Thanks you very much 🙂

    • Kyle Beckman October 2, 2015 / 1:34 PM

      It’s clearly a driver… have you tried getting the NIC driver directly from the NIC manufacturer? Typically, those are newer than what the OEM offers.

  7. Chris Wilson November 13, 2015 / 2:46 PM

    Good tips, Kyle. We’re using this same strategy at my workplace. However, one additional question:

    Is it possible to assign the Windows pagefile to a specific partition? Right now through our task sequence, the D: drive has the pagefile. I’m not sure if this is because of the original image we captured, something in MDT 2013, or something else entirely. But we’d like to have the pagefile live on the C/OSDisk partition after deploying an image.

    Please let me know if you have any ideas on how to make that happen through the OSD task sequence.

  8. Alex Huynh May 17, 2016 / 5:08 PM

    Hi Kyle,

    When you create multiple partitions using the Format and Partition Disk as above, can you assign the drive letter at the same time?
    I had a step in the State Restore to do this by running disk part. However it does not work for some reason and the task sequence fails with “Unable to locate the result.xml file needed to determine the deployment results.” No logs were created as well. I know this is the step that caused the failure despite that the error seems to have no relation.

    Basically this is my disk partitions: 1 disk, 4 partitions:

    Disk partitions done in the Preinstall phase using Format and Partition Disk
    System reserved (Volume 1)
    Recovery (Volume 2)
    OS (Volume 3)
    Data (Volume 4)

    The diskpart script: Done in the State restore by Run Command Line with the command line: diskpart /s %SCRIPTROOT%\Diskpart\assign_drive_letters.txt

    select volume 0
    assign letter=F –> assign DVD-ROM to letter F
    select disk 0
    select volume 2
    assign letter=R –> assign Recovery partition with letter R
    select volume 4
    assign letter=D –> assign Data partition with letter D

    The sequence always fails. If I remove the last 2 lines (select volume 4 & assign letter=D) then the sequence will complete successfully.

    Thank you for your help.


  9. Ahmad July 17, 2016 / 4:07 AM

    this is useful post but how i can deploy wim files to second partition

Leave a Reply