Custom partition hard disk sizes with MDT

Our company recently refresh notebook spec minimum hard disk space from 256GB to 512GB. Deploying notebook using MDT has become challenging because for the notebook with 256GB we maintain whole drive as C without partition. While for the notebook with 512GB, we partition C to 300GB and the remaining to D.

After Googling for while, I found the answer from several tutorials. This requirement can be simply solved by adding a WMI query into task sequence.


Let’s see how the configuration works!

  1. Get into your Task Sequence and navigate to Preinstall->New Computer OnlyMDT011
  2. Delete all existing volume, right-click the partition and click X to delete
  3. Click Yes to confirm delete. Repeat the same process for the rest of the volume.
  4. Create the first volume for OS. I set 300GB for C drive
  5. Remaining will be my data drive, so use the percentage option
  6. Okay here is the trick, on the “Format and Partition Disk (BIOS)” click the “Options”
    then select “Query WMI”
  7. Insert the following WMI query

    SELECT * FROM Win32_DiskDrive WHERE Size > 314572800

    This means format C to 300 GB and remaining to D if my total hard disk size is more than 300GB.
    Calculation as below
    300 * 1024 * 1024 = 314572800 KB

  8. Now we create another Task Sequence for hard disk which is 256GB
  9. Create 1 volume with 100% disk space remaining
  10. Insert WMI Query rule

    SELECT * FROM Win32_DiskDrive WHERE Size < 314572800
  11. Final result. Repeat the above step to create the task sequence for UEFI disk. Click Apply and OK.
    MDT039That’s it! hope you enjoy this tutorial.Special thanks to Johan from his blog

1 Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s