This is the built-in help made by Microsoft for the command 'Get-Disk', in PowerShell version 5 - as retrieved from
Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.
For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.
Gets one or more disks visible to the operating system.
Get-Disk [[-Number] <UInt32[]>] [-AsJob] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [<CommonParameters>]
Get-Disk [-AsJob] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-VirtualDisk <CimInstance>] [<CommonParameters>]
Get-Disk [-AsJob] [-CimSession <CimSession[]>] [-Partition <CimInstance>] [-ThrottleLimit <Int32>] [<CommonParameters>]
Get-Disk [-AsJob] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-UniqueId <String[]>] [<CommonParameters>]
Get-Disk [-AsJob] [-CimSession <CimSession[]>] [-iSCSIConnection <CimInstance>] [-ThrottleLimit <Int32>] [<CommonParameters>]
Get-Disk [-AsJob] [-CimSession <CimSession[]>] [-iSCSISession <CimInstance>] [-ThrottleLimit <Int32>] [<CommonParameters>]
Get-Disk [-AsJob] [-CimSession <CimSession[]>] [-Path <String[]>] [-ThrottleLimit <Int32>] [<CommonParameters>]
Get-Disk [-AsJob] [-CimSession <CimSession[]>] [-FriendlyName <String[]>] [-ThrottleLimit <Int32>] [<CommonParameters>]
The Get-Disk cmdlet gets one or more Disk objects visible to the operating system, or optionally a filtered list.
<
Online Version: http://go.microsoft.com/fwlink/?LinkID=294432
Where-Object
Clear-Disk
Get-Partition
Initialize-Disk
Set-Disk
Update-Disk
<
Example 1: Get all disks
PS C:\>Get-Disk
This example gets all disks visible to the operating system.
Example 2: Get a disk by disk number
PS C:\>Get-Disk -Number 6
This example gets disk 6.
Example 3: Get all USB disks
PS C:\>Get-Disk | Where-Object –FilterScript {$_.Bustype -Eq "USB"}
This example gets all disks attached via the USB bus by piping the output of Get-Disk to the Where-Object cmdlet, and filtering by the USB value of the Bustype property.
Example 4: Get the iSCSI sessions for all iSCSI disks
PS C:\>Get-Disk | Where-Object –FilterScript {$_.BusType -Eq "iSCSI"} |
Get-IscsiSession | Format-Table
This example gets all disks attached via the iSCSI bus by piping the output of Get-Disk to the Where-Object cmdlet, and filtering by the iSCSI value of the Bustype property.
It then passes the Disk objects in the pipeline to the Get-IscisSession cmdlet, which gets the associated iSCSI sessions, and then pipes the output to the Format-Table
cmdlet for simplified display.