Export (0) Print
Expand All
Expand Minimize

Get-VirtualDisk

Windows Server 2012 R2 and Windows 8.1

Updated: June 4, 2014

Applies To: Windows 8.1, Windows PowerShell 4.0, Windows Server 2012 R2

Get-VirtualDisk

Returns a list of VirtualDisk objects, across all storage pools, across all providers, or optionally a filtered subset based on provided criteria.

Syntax

Parameter Set: ByFriendlyName
Get-VirtualDisk [[-FriendlyName] <String[]> ] [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]

Parameter Set: ByDisk
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-Disk <CimInstance> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]

Parameter Set: ByInitiatorId
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-InitiatorId <CimInstance> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]

Parameter Set: ByInitiatorPort
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-InitiatorPort <CimInstance> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]

Parameter Set: ByMaskingSet
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-MaskingSet <CimInstance> ] [-OtherUsageDescription <String[]> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]

Parameter Set: ByName
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-Name <String[]> ] [-OtherUsageDescription <String[]> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]

Parameter Set: ByPhysicalDisk
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-PhysicalDisk <CimInstance> ] [-PhysicalRangeMax <UInt64> ] [-PhysicalRangeMin <UInt64> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]

Parameter Set: BySourceVirtualDisk
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-SourceVirtualDisk <CimInstance> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]

Parameter Set: ByStorageJob
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-StorageJob <CimInstance> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]

Parameter Set: ByStorageNode
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-StorageNode <CimInstance> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]

Parameter Set: ByStoragePool
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-StoragePool <CimInstance> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]

Parameter Set: ByStorageSubSystem
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-StorageSubSystem <CimInstance> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]

Parameter Set: ByStorageTier
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-StorageTier <CimInstance> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]

Parameter Set: ByTargetPort
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-TargetPort <CimInstance> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]

Parameter Set: ByTargetVirtualDisk
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-TargetVirtualDisk <CimInstance> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]

Parameter Set: ByUniqueId
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-ThrottleLimit <Int32> ] [-UniqueId <String[]> ] [-Usage <Usage[]> ] [ <CommonParameters>]




Detailed Description

The Get-VirtualDisk cmdlet returns a list of VirtualDisk objects, across all storage pools, across all providers, or optionally a filtered subset based on provided criteria.

Parameters

-AsJob

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete. The cmdlet immediately returns an object that represents the job and then displays the command prompt. You can continue to work in the session while the job completes. To manage the job, use the *-Job cmdlets. To get the job results, use the Receive-Job cmdlet. For more information about Windows PowerShell® background jobs, see about_Jobs.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CimSession<CimSession[]>

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.


Aliases

Session

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Disk<CimInstance>

Accepts a Disk object as input. The Disk CIM object is exposed by the Get-Disk cmdlet.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-FriendlyName<String[]>

Specifies a friendly name for a disk. The friendly name may be defined by a user and is not guaranteed to be unique.


Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-HealthStatus<HealthStatus[]>

Specifies the status of an object and indicates if the object is Healthy or Warning Unhealthy.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-InitiatorId<CimInstance>

Accepts an InitiatorId object as input. The Initiator ID CIM object is exposed by the Get-InitiatorId cmdlet.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-InitiatorPort<CimInstance>

Accepts an InitiatorPort object as input. The Initiator Port CIM object is exposed by the Get-InitiatorPort cmdlet.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-IsSnapshot<Boolean[]>

Specifies that the virtual disk is a snapshot of another virtual disk.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MaskingSet<CimInstance>

Accepts a MaskingSet object as input. The Masking Set CIM object is exposed by the Get-MaskingSet cmdlet.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-Name<String[]>

Specifies the name of an object or setting.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-OtherUsageDescription<String[]>

Specifies the usage of this object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PhysicalDisk<CimInstance>

Accepts a PhysicalDisk object as input. The Physical Disk CIM object is exposed by the Get-PhysicalDisk cmdlet.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-PhysicalRangeMax<UInt64>

This parameter is reserved for future use.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PhysicalRangeMin<UInt64>

This parameter is reserved for future use.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SourceVirtualDisk<CimInstance>

Specifies a virtual disk as a CIMInstance object. The cmdlet gets the snapshot or clone virtual disks that were created from the virtual disk that you specify. To obtain a virtual disk object, use the Get-VirtualDisk cmdlet.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-StorageJob<CimInstance>

Specifies an outstanding storage job as a CIMInstance object. The cmdlet gets the virtual disks associated with the storage jobs that you specify. To obtain a virtual disk object, use the Get-StorageJob cmdlet.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-StorageNode<CimInstance>

Specifies a storage node as a CIMInstance object. The cmdlet gets the virtual disks that belong to the storage node that you specify. The virtual disks that belong to the storage node have read/write permissions on the node. To obtain a virtual disk object, use the Get-StorageNode cmdlet.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-StoragePool<CimInstance>

Accepts a StoragePool object as input. The Storage Pool CIM object is exposed by the Get-StoragePool cmdlet.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-StorageSubSystem<CimInstance>

Accepts a StorageSubsystem object as input. The Storage Subsystem CIM object is exposed by the Get-StorageSubsystem cmdlet.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-StorageTier<CimInstance>

Specifies a storage tier as a CIMInstance object. The cmdlet gets the virtual disks included in the storage tier that you specify. To obtain a virtual disk object, use the Get-StorageTier cmdlet.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-TargetPort<CimInstance>

Accepts a TargetPort object as input. The Target Port CIM object is exposed by the Get-TargetPort cmdlet.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-TargetVirtualDisk<CimInstance>

Specifies a virtual disk as a CIMInstance object. The cmdlet gets the virtual disk from which the snapshot or clone virtual disk that you specify were created. To obtain a virtual disk object, use the Get-VirtualDisk cmdlet.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ThrottleLimit<Int32>

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-UniqueId<String[]>

Specifies an ID used to uniquely identify a Disk object in the system. The ID persists through restarts.


Aliases

Id

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Usage<Usage[]>

Indicates the intended usage of the virtual disk.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

EXAMPLE 1

This example returns all VirtualDisk objects across all visible StoragePool objects, across all visible StorageProvider objects.


PS C:\> Get-VirtualDisk

EXAMPLE 2

This example lists only the virtual disks from the StoragePool object named SpacesPool.


PS C:\> $stpool = (Get-StoragePool -FriendlyName "SpacesPool")
PS C:\> Get-VirtualDisk -StoragePool $stpool

EXAMPLE 3

This example lists all virtual disks, across all pools, and all providers, which are not currently in a healthy state.


PS C:\> Get-VirtualDisk | Where-Object –FilterScript {$_.HealthStatus -Ne "Healthy"}

EXAMPLE 4

This example gets the partition and volume associated with a virtual disk. The command gets the virtual disk named VDisk01 and passes the virtual disk to the Get-Disk cmdlet by using the pipeline operator. The Get-Disk cmdlet gets the disk associated with the virtual disk and passes the disk to the Get-Partition by using the pipeline operator. The Get-Partition cmdlet gets the partition associated with the disk, and passes the partition to the Get-Volume cmdlet by using the pipeline operator. The Get-Volume cmdlet gets the volume associated with the partition.


PS C:\> Get-VirtualDisk –FriendlyName "VDisk01" | Get-Disk | Get-Partition | Get-Volume

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft