Get-EmcDatastore

Gets the list of VMware datastores.

 

Syntax

 

Parameters

-ID <String>

Attributes: Optional, Position: 1

Specifies the VMware datastore name or Uuid. Wildcards are permitted. It is a positional parameter (position = 1).

 

-VcenterSystem <IVcenterSystem>

Attributes: Optional, Position: named

Specifies the vCenter server.

 

-Silent <SwitchParameter>

Attributes: Optional, Position: named

Turns off all the informational and verbose messages. However, it still displays errors.

 

-ESXHostSystem <IESXHostSystem>

Attributes: Optional, Position: named

Specifies the ESI ESX host system object, which you can get by using the Get-EmcESXHost cmdlet.

 

-ScsiLun <ScsiLun>

Attributes: Optional, Position: named

Specifies the ESI SCSI LUN object, which you can get by using the ESI VMware system or ESX host system object, or by using the Get-EmcScsiLun cmdlet.

 

-Lun <Lun>

Attributes: Optional, Position: named

Specifies the ESI LUN object, which you can get by using the ESI storage system object or by using the Get-EmcLun cmdlet.

 

<CommonParameters>

This cmdlet supports these common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, and OutVariable. Type get-help about_commonparameters for more details.

 

Examples

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

C:\PS>$hBlob = Get-EmcVmWareSystemCredential

C:\PS>$h = $hBlob | Connect-EmcSystem

C:\PS>Get-EmcDatastore -VcenterSystem $h

 

C:\PS>$h | Update-EmcSystem

C:\PS>Get-EmcDatastore -VcenterSystem $h

This example gets all datastores of the specified Vcenter system.

 

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

C:\PS>$h = Get-EmcHostSystem *myVMware*

C:\PS>$h | Update-EmcSystem

C:\PS>$h | Get-EmcDatastore -ID *datastore1

C:\PS>$h | Get-EmcDatastore *datastore1

This example gets the datastores of the specified VMware system with the specified name. Wildcards are permitted. Because the ID parameter is positional, you can omit the name.

 

-------------- Example 3 --------------

C:\PS>$vc = Get-EmcVcenterSystem *myVcenter*

C:\PS>$esxhost = Get-EmcESXHost -VcenterSystem $vc

C:\PS>Get-EmcDatastore -ESXHostSystem $esxhost

This example gets all datastores of the specified ESX host system.

 

-------------- Example 4 --------------

C:\PS>$lun = Get-EmcLUN -ID 298

C:\PS> Get-EmcDatastore  -Lun $lun

This example gets the datastores associated with the specified LUN object.

 

-------------- Example 5 --------------

C:\PS>$sl = Get-EmcScsiLun -ID *myScsiLun*

C:\PS> Get-EmcDatastore  -ScsiLun $sl

This example gets the datastores associated with the specified SCSI LUN object.