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,
Silvan
SilvanSystem EngineerAsked:
Who is Participating?
 
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?
0
 
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:
https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-add-packages--optional-components-reference

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

Best regards,
Silvan
0
 
Adam LeinssServer SpecialistCommented:
Very nicely done!  That's pretty silly that MDT would not offer a storage package in the GUI.
0
 
SilvanSystem EngineerAuthor Commented:
Yes, unfortunately MDT does not support the WinPE-StorageWMI function in the GUI. But at least there is a workaround :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.