## 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

Name | Type | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | --- | ---
Name | String[] | Filters the VDisk objects by name. | false | false
Datastore | Datastore[] | Specifies the datastore from which you want to retrieve the VDisk objects. | false | true (ByValue)
Id | String[] | Filters the VDisk objects by ID. | true | false
Server | VIServer[] | 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. | false | false

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.