PowerCLI Reference

Get-VDisk

Synopsis

This cmdlet lists VDisk objects based on the specified filters.

Syntax

Get-VDisk [-Datastore <Datastore[]>] [[-Name] <String[]>] [-Server <VIServer[]>] [<CommonParameters>]

Get-VDisk -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Copy-VDisk
Move-VDisk
New-VDisk
Remove-VDisk
Set-VDisk

Detailed Description

This cmdlet lists VDisk objects based on the specified filters.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
NameString[]Filters the VDisk objects by name.falsefalse
DatastoreDatastore[]Specifies the datastore from which you want to retrieve the VDisk objects.falsetrue (ByValue)
IdString[]Filters the VDisk objects by ID.truefalse
ServerVIServer[]Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.falsefalse

Return Type

Zero or more VDisk objects

Notes

Examples

-------------- Example 1 --------------

Get-VDisk -Name 'MyDisk' -Datastore $ds

Retrieves the VDisk objects named 'MyDisk' from the $ds datastore.

-------------- Example 2 --------------

Get-VDisk -Id 'VDiskId'

Retrieves the VDisk with Id 'VDiskId'.


Copyright © VMware, Inc. All rights reserved.