Hi, @MAS2487
Just checking in to see if there is any update. We haven't heard from you for a few days and would like to know the current status of the problem. Is the problem solved?
If the current version of your SCCM is 2006 or further, here's an another method that can meet your needs.
Since version 2006, SCCM introduced "Variable name to store disk number", so in order to deploy the OS the to SSD, you can add a step " Run PowerShell Script" in task sequence to run the following scripts.
#defalt value
$disk_idx = 0
#retrieve SSD
$ssd_disk = get-physicaldisk | where mediatype -like 'ssd'
#multiple SSD
if (@($ssd_disk).count -gt 1)
{
#multiple nvme SSD, choose the smallest one
if (@($ssd_disk | where bustype -like 'nvme').count -gt 1)
{
$disk_idx = $ssd_disk | Sort-Object -Property Size | Select-Object -ExpandProperty DeviceID -First 1
}
elseif (@($ssd_disk | where bustype -like 'nvme').count -eq 1)
{
$disk_idx = ($ssd_disk | where bustype -like 'nvme').deviceid
}
}
#singel SSD
elseif (@($ssd_disk).count -eq 1)
{
#multiple physical disks, choose SSD
if (@(get-physicaldisk).count -gt 1)
{
$disk_idx = ($ssd_disk).deviceid
}
#single pysical disks
else
{
$disk_idx = 0
}
}
#Write-Host "disk selected: $disk_idx"
(New-Object -COMObject Microsoft.SMS.TSEnvironment).Value('OSDDiskIndex') = $disk_idx
Below is the steps for your reference:
- Add a step Run PowerShell Script and choose Enter a PowerShell script, then enter the scripts.
- In the step Format and Partition Disk, choose Variable name to store disk number, and enter the "OSDDiskIndex" in the box.
If you need further help, please don't hesitate to tell us. Look forward to hearing from you.
Thanks for your time.
If the response is helpful, please click "Accept Answer"and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.