In this post, we learn about ConfigMgr Task Sequence OSD Multiple Physical Drives. Let’s try to understand how can we use conditions in the Task sequence to install operating systems via SCCM Task Sequence on a machine having dual drives.
The below articles will give you an idea about the scenario which I have faced in installing a windows OS on a machine having two physical Hard drives. The conditions can be customized according to the environment and requirements.
We are taking an example of a system with a dual drive (or more) configuration, an NVMe drive, and either a SATA mechanical disk or SATA SSD. In some cases, the SATA disk may be enumerated as Disk 0 and the NVMe drive as Disk 1 or vice versa.
This can be confirmed by booting to WinPE, executing the DiskPart utility, and selecting disk 0 and/or disk 1, followed by the command detail disk. Note the type of disk displayed, which will either be SATA or NVMe.
In a default standard SCCM OSD task sequence, disk 0 will be formatted and partitioned depending on the partition scheme assigned (MBR or GPT). As the newer models are getting released the SATA mechanical disks or even SATA SSD disks are getting replaced with NVMe disks.
Info on Dual Drives
To check the drives on your machine use the below command in PowerShell.
wmic diskdrive get index,model
You can also check the information on dual drive using disk management, open diskmgmt.msc right-click on disk for which you want information as in my case I want information on disk 1, you can get info in the General tab.
Similarly, if you have dual drive one with NVMe and another with SATA mechanical or SATA SDD it will show accordingly.
Ideally, the Windows OS should be installed on NVMe disk for better performance ( Why it should be installed on NVMe disk is a different topic ), there are many ways to achieve it you can add dynamic variables inside the OSD task sequence, you can use scripts to achieve it.
By if you are aware of your environment and know the hardware which is being used with their configurations then it can be simply achieved by a WMI condition. Below are the steps which you can add to your task sequence to achieve it:
- I created two groups with Format and Partition conditions as below, I am aware of the models which are procured in my environment, but to be on detect if NVMe disk is at 0 or 1 the two groups are created
- The first group will format and partition if NVMe is at disk 0 and make it as OS disk and the other disk as a data disk, in the second group if NVMe is found at disk 1 that will be configured as OS disk, and the other one as data disk.
You can add two conditions first one on getting info on disk drive details and second one on the models on which you want to perform this step.
Select * from Win32_DiskDrive where Model like "%NVMe%" and Index=0
Select * from Win32_ComputerSystem where Model like "%Model%"
You can go through the smsts.log during Image build to find out if the conditions which you have configured are meeting your requirement.
Location of smsts.log before hard drive is formatted
Location of smsts.log after hard drive is formatted and partitioned.
Let’s look into the results now.
You can customize the condition according to your environment and requirement.