Sandbox
19.10.11 David Segura
New-OSDDisk
contains alot of parameters that you need to learn. Keep in mind this function was designed to run in WinPE | WinRE | WinSE and it will not execute in Windows OS. Rather than just throw an error and quit in full Windows Client, an Information Mode was designed. Use Sandbox to test your parameters
Run New-OSDDisk
without any parameters as a quick test, don't worry, it will not perform anything destructive in Windows OS, even when adding the Force
parameter
New-OSDDisk

DiskNumber
#Fixed Disk Number
#Alias = Disk, Number
[Alias('Disk','Number')]
[int]$DiskNumber
The DiskNumber
is automatically selected for you if you only have one Fixed Disk. You will receive a prompt to select the disk if you have multiple Fixed Disks unless you set this parameter. You can easily change this to whatever Disk you want as your OSDDisk

ClearDisk = All
#Clear-Disk Scope
#All will Clear all non-RAW Fixed Disks
#OSDDisk will Clear only the DiskNumber or SelectDisk
#Default = All
#Alias = Clear
[Alias('Clear')]
[ValidateSet('All','OSDDisk')]
[string]$ClearDisk = 'All'
New-OSDDisk
will Clear-Disk
every Fixed Disk by default to ensure that all the drives are clean. You can change this to OSDDisk
and it will only clear the Disk that will be the OSDDisk
New-OSDDisk -ClearDisk OSDDisk

SelectDisk
#Select OSDDisk if multiple Fixed Disks are present
#Supersedes the DiskNumber parameter
#Ignored if only one Fixed Disk is present
[switch]$SelectDisk
This is a good parameter to use if you have systems with multiple drives. This will prompt you to select a Fixed Disk to use before continuing. On systems with a single Fixed Disk, there will not be any prompts
I recommend using this parameter by default for Interactive installations
New-OSDDisk -SelectDisk

Last updated
Was this helpful?