OS Disk Selection during Task Sequence - MDT (Microsoft Deployment Toolkit)

Dear Community,

In our company we implemented an MDT infrastructure to deploy Windows 10 to notebooks. Most of our phyiscal device have more than one hard disk installed. Usually there are two disks. One SSD disk and a normal HDD. The target is to install the Operating System to the SSD (if there is one installed).

Our challenge:
Usually the first disk loaded disk in Windows PW gets ID 0, the second loaded Disk gets ID 1 and so on. There are notebook models, where the SSD is does not get Disk ID 0. In our task sequence the we specified to install the operating system to the Disk with the ID 0. Of course I could change that for these specific notebook models, but that is not the target.

Already tried:
- Added the following featuers to Windows PE: DISM Cmdlets, Enhanced Storage, .NET Framework, winpe-platformid, Windows Powershell, Storage Management Cmdlets
- WMI Filtering and Powershell Filteroptions (two examples)

Example 1 - Get-WmiObject -Class Win32_DiskDrive
For this command there is no possibility to see if the disk is an SSD or not

Example 2  - Get-WmiObject -Class MSFT_PhysicalDisk -Namespace “root\microsoft\windows\storage”
With this command I can filter by media type and see if it is an SSD or an HDD, but this command is not available during Windows PE. After the a successful OS installation it is possible to execute that command in Powershell.

References that I tried:
- http://therealnoob.com/index.php/2017/03/18/mdt-zti-select-ssd-type-as-osddiskindex/

Now the main question :)
Is there a way to install the operating system to an SSD drive if there are multiple disks installed and even the SSD disk has the ID 0 or 1? Of course I can do several task sequences for these specific models, but there should be better way. Maybe there is a way with a Custom variable during the task sequence?

Thanks in advance for your help

Best regards,
SilvanSystem EngineerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Adam LeinssServer SpecialistCommented:
Are you rebuilding the WinPE boot media after you add these components?  How are you booting the device(s) in question...PXE, USB stick?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SilvanSystem EngineerAuthor Commented:
Hi Adam

I am booting the devices over PXE. After some further troubleshooting I realized, that the built-in feature WinPE-StorageWMI is missing in MDT GUI. Unter the deploymentshare properties > Windowns PE > x64> Features are all available features listed. Therefore I had to add the WinPE-StorageWMI to the boot image manually by the following commands:

  1. Start "Deployment and Imaging Tools Environment" from Windows ADK
  2. copype amd64 C:\temp\WinPE_amd64
  3. Dism /Mount-Image /ImageFile:"C:\temp\WinPE_amd64\media\sources\boot.wim" /index:1 /MountDir:"C:\temp\WinPE_amd64\mount"
  4. Dism /Add-Package /Image:"C:\temp\WinPE_amd64\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-StorageWMI.cab"
  5. Dism /Unmount-Image /MountDir:"C:\temp\WinPE_amd64\mount" /commit
  6. MakeWinPEMedia /ISO C:\temp\WinPE_amd64 C:\temp\WinPE_amd64\LiteTouchPE_x64_V002.iso

After these steps I was able to create WMI or Powershell queries with the "MSFT_PhysicalDisk" class.
The full documentation about creating a WinPE boot media is available under the following link:

Thanks for your input Adam. I thought that WinPE-StorageWMI was already in the boot image.

Best regards,
Adam LeinssServer SpecialistCommented:
Very nicely done!  That's pretty silly that MDT would not offer a storage package in the GUI.
SilvanSystem EngineerAuthor Commented:
Yes, unfortunately MDT does not support the WinPE-StorageWMI function in the GUI. But at least there is a workaround :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.