Get-EmcHostVolume

Gets the list of host volumes.

 

Syntax

 

Parameters

-ID <String>

Attributes: Optional, Position: 1

Specifies the host volume label, drive letter, mount path, or HostVolumeIdentifier. Wildcards are permitted. It is a positional parameter (position = 1).

 

-HostDisk <Disk>

Attributes: Required, Position: named

Specifies the ESI host disk object. You can get this from the ESI host system object or by using the Get-EmcHostDisk or Find-EmcHostDisk cmdlets.

 

-Silent <SwitchParameter>

Attributes: Optional, Position: named

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

 

-ClusterSystem <IClusterSystem>

Attributes: Required, Position: named

Specifies the ESI cluster system object. You can add a cluster system object to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets. You can get a cluster system object by using the Get-EmcClusterSystem cmdlet.

 

-HostSystem <IHostSystem>

Attributes: Required, Position: named

Specifies the ESI host system object. You can add a host system object to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets. You can get a host system object by using the Get-EmcHostSystem cmdlet. The object can be a stand-alone host system, a virtual machine, or a hypervisor.

 

-ClusterDisk <WindowsBasicClusterDisk>

Attributes: Required, Position: named

Specifies the ESI cluster disk object. You can get a cluster disk object from the ESI cluster system object or by using the Get-EmcClusterDisk cmdlet.

 

-MailboxDatabase <MailboxDatabase>

Attributes: Required, Position: named

Specifies the name of the mailbox database.

 

-MailboxDatabaseFileType <MailBoxDatabaseFileType>

Attributes: Optional, Position: named

Specifies the mailbox database file type associated with the host volume. It can be passed as an edbfile, logs, or All. By default it is set to All.

 

-MailboxDatabaseCopy <MailboxDatabaseCopy>

Attributes: Required, Position: named

Specifies the mailbox database copy.

 

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

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

C:\PS>$h.RefreshDisks()

C:\PS>Get-EmcHostVolume -HostSystem $h

C:\PS>$h | Update-EmcSystem

C:\PS>Get-EmcHostVolume -HostSystem $h

This example gets all volumes of the specified host.

 

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

C:\PS>Get-EmcHostSystem | Update-EmcSystem

C:\PS>Get-EmcHostVolume

This example gets all host volumes on all connected hosts.

 

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

C:\PS>$cBlob = Get-EmcClusterSystemCredential

C:\PS>$c = $cBlob | Connect-EmcSystem

C:\PS>$c.RefreshClusterDisks()

C:\PS>Get-EmcHostVolume -ClusterSystem $c

C:\PS>$c | Update-EmcSystem

C:\PS>Get-EmcHostVolume -ClusterSystem $c

C:\PS>Get-EmcClusterDisk | Get-EmcHostVolume | select mountpath

MountPath

---------

F:\

B:\

This example gets the volumes of cluster disks or cluster systems.

 

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

C:\PS>Get-EmcHostSystem | Update-EmcSystem

C:\PS>Get-EmcClusterSystem | Update-EmcSystem

C:\PS>Get-EmcHostVolume c:\

C:\PS>Get-EmcHostVolume c*

C:\PS>Get-EmcHostVolume volume_label_1

C:\PS>Get-EmcHostVolume -id "c:\mountpath\*"

C:\PS>Get-EmcHostVolume -id \\?\*

This example gets the volumes based on the drive letter or mount path or label or volume identifier. Wildcards are permitted. Because the ID parameter is positional, you can omit the name.

 

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

C:\PS>$cluster = Get-EmcClusterSystem myCluster

C:\PS>$cd = Get-EmcClusterDisk "Cluster Disk 1" -ClusterSystem $cluster

C:\PS>$vol = Get-EmcHostVolume "J:" -ClusterDisk $cd

C:\PS>$disk = Get-EmcHostDisk -Volume $vol -ClusterSystem $cluster

C:\PS>$vol = Get-EmcHostVolume -Host $disk - ClusterSystem $cluster

This example gets the host volumes associated with a cluster and a host disk, and gets the host disks associated with a cluster and a volume.

 

-------------- Example 6 --------------

C:\PS>$db= Get-EmcMailboxDatabase rvdb20

C:\PS>Get-EmcHostVolume -MailboxDatabase $db -MailboxDatabaseFileType All

This example gets the host volumes for the edbfile and log folder associated with the specified mailbox database.

 

-------------- Example 7 --------------

C:\PS>$database = Get-EmcMailboxDatabase  db1

C:\PS>$vol = Get-EmcHostVolume -MailboxDatabase $database

This example shows how to get host volumes associated with a mailbox database.

 

-------------- Example 8 --------------

C:\PS>$databasecopy = Get-EmcMailboxDatabaseCopy  db1\MS2

C:\PS>$vol = Get-EmcHostVolume -MailboxDatabase $databasecopy

This example shows how to get host volumes associated with a mailbox database copy.