Hello friends
We all have multidisk machines in production and its really an issue when we need to image them using SCCM task sequence. There is quite a chance that you will stage image on wrong disk. In most cases we should have solution to cater these two requirements:
- If there is SSD disk in machine, image should be installed on that disk.
- In case of multiple SSD, image should be installed on smallest SSD.
The reason of wrong disk selection is because disk ID is not fixed in Windows. So how we can fix this? I have fixed it simply using small script and ran it as command line before formatting disk and applying image.

Here is script to select smallest SSD disk for imaging
PowerShell -ExecutionPolicy Bypass -Command “& { (New-Object -COMObject Microsoft.SMS.TSEnvironment).Value(‘OSDDiskIndex’) = Get-PhysicalDisk | Where MediaType -EQ ‘SSD’ | Sort-Object -Property Size | Select-Object -ExpandProperty DeviceID -First 1 }”
This is how step will look like:

Note: This step need to run before you initiate formatting and installation of image hence should be in very beginning of task sequence.
So this was all in this short blog. See you soon with some other technical information. Till then ta-ta.
Dear Vinit,
could you please explain a little bit more on how to proceed further?
And how to use/implement the result in the next steps?
Is it necessary to include “OSDDiskIndex” in the next steps? And how?
Best regards
Michael
LikeLike
Yes, please use this variable in step where you format and deploy image. Hope this helps.
LikeLike