Get-OSDDisk
OSD 21.2.22+
Last updated
OSD 21.2.22+
Last updated
This function is mostly identical to Get-Disk
, although it adds MediaType (from Get-PhysicalDisk
). This is useful in determining a HDD vs SSD
PS C:\> Get-Help Get-OSDDisk -Parameter *
-Number <UInt32>
Specifies the disk number for which to get the associated Disk object
Alias = Disk, DiskNumber
Required? false
Position? 1
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-BootFromDisk <Boolean>
Returns Disk results based BootFromDisk property
PS> Get-OSDDisk -BootFromDisk:$true
PS> Get-OSDDisk -BootFromDisk:$false
Required? false
Position? 2
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-IsBoot <Boolean>
Returns Disk results based IsBoot property
PS> Get-OSDDisk -IsBoot:$true
PS> Get-OSDDisk -IsBoot:$false
Required? false
Position? 3
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-IsReadOnly <Boolean>
Returns Disk results based IsReadOnly property
PS> Get-OSDDisk -IsReadOnly:$true
PS> Get-OSDDisk -IsReadOnly:$false
Required? false
Position? 4
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-IsSystem <Boolean>
Returns Disk results based IsSystem property
PS> Get-OSDDisk -IsSystem:$true
PS> Get-OSDDisk -IsSystem:$false
Required? false
Position? 5
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-BusType <String[]>
Returns Disk results in BusType values
Values = '1394','ATA','ATAPI','Fibre Channel','File Backed Virtual','iSCSI','MMC','MAX','Microsoft
Reserved','NVMe','RAID','SAS','SATA','SCSI','SD','SSA','Storage Spaces','USB','Virtual'
PS> Get-OSDDisk -BusType NVMe
PS> Get-OSDDisk -BusType NVMe,SAS
Required? false
Position? 6
Default value
Accept pipeline input? false
Accept wildcard characters? false
-BusTypeNot <String[]>
Returns Disk results notin BusType values
Values = '1394','ATA','ATAPI','Fibre Channel','File Backed Virtual','iSCSI','MMC','MAX','Microsoft
Reserved','NVMe','RAID','SAS','SATA','SCSI','SD','SSA','Storage Spaces','USB','Virtual'
PS> Get-OSDDisk -BusTypeNot USB
PS> Get-OSDDisk -BusTypeNot USB,Virtual
-MediaType <String[]>
Returns Disk results in MediaType values
Values = 'SSD','HDD','SCM','Unspecified'
PS> Get-OSDDisk -MediaType SSD
Required? false
Position? 8
Default value
Accept pipeline input? false
Accept wildcard characters? false
-MediaTypeNot <String[]>
Returns Disk results notin MediaType values
Values = 'SSD','HDD','SCM','Unspecified'
PS> Get-OSDDisk -MediaTypeNot HDD
Required? false
Position? 9
Default value
Accept pipeline input? false
Accept wildcard characters? false
-PartitionStyle <String[]>
Returns Disk results in PartitionStyle values
Values = 'GPT','MBR','RAW'
PS> Get-OSDDisk -PartitionStyle GPT
Required? false
Position? 10
Default value
Accept pipeline input? false
Accept wildcard characters? false
-PartitionStyleNot <String[]>
Returns Disk results notin PartitionStyle values
Values = 'GPT','MBR','RAW'
PS> Get-OSDDisk -PartitionStyleNot RAW
Required? false
Position? 11
Default value
Accept pipeline input? false
Accept wildcard characters? false