Get-EmcHostDisk

Gets a list of host disk objects.

 

Syntax

 

Parameters

-ID <String>

Attributes: Optional, Position: 1

Specifies the host disks HostDiskIdentifier, MbrDiskSignature, or GptDiskGuid. Wildcards are permitted. It is a positional parameter (position = 1).

 

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

 

-Silent <SwitchParameter>

Attributes: Optional, Position: named

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

 

-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. It can be a stand-alone host system, a virtual machine, or a hypervisor.

 

-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-EmcClusterSystemCredential and Connect-EmcSystem cmdlets. You can get a cluster system object by using the Get-EmcClusterSystem cmdlet.

 

-Volume <Volume>

Attributes: Required, Position: named

Specifies the ESI volume object, which you can get from the ESI host system object or by using the Get-EmcHostVolume cmdlet.

 

-AllNodeHostDisk <SwitchParameter>

Attributes: Required, Position: named

Indicates that this cmdlet queries host disks on all the nodes of the specified cluster.

 

-ClusteredHostDisk <SwitchParameter>

Attributes: Required, Position: named

Indicates that this cmdlet queries host disks that are clustered.

 

-MailboxDatabase <MailboxDatabase>

Attributes: Required, Position: named

Specifies the mailbox database associated with the host disk.

 

-MailboxDatabaseFileType <MailBoxDatabaseFileType>

Attributes: Optional, Position: named

Specifies the mailbox database file type associated with the host disk. It can be passed as edbfile, logs or ALL. By Default its set to All.

 

-MailboxDatabaseCopy <MailboxDatabaseCopy>

Attributes: Required, Position: named

Specifies the mailbox database copy.

 

-ClusterNode <WindowsFailoverClusterNode>

Attributes: Required, Position: named

Specifies the cluster node on which the host disks are located.

 

<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-EmcHostDisk -HostSystem $h

C:\PS>$h | Update-EmcSystem

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

This example gets all disks of the specified host.

 

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

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

C:\PS>Get-EmcHostDisk

This example gets all disks on all of the connected hosts.

 

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

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

C:\PS>$h | Update-EmcSystem

C:\PS>Get-EmcHostDisk -ID  \\?\PhysicalDrive8 -HostSystem $h

C:\PS>Get-EmcHostDisk -ID *Drive8* -HostSystem $h

C:\PS>Get-EmcHostDisk \\?\PhysicalDrive8 -HostSystem $h

C:\PS>Get-EmcHostDisk *Drive8* -HostSystem $h

This example gets the host disks of the specified host system with the specified HostDiskIdentifier, MbrDiskSignature, or GptDiskGuid (accepts wildcard).

 

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

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

C:\PS>Get-EmcHostDisk -ID  \\?\PhysicalDrive8

C:\PS>Get-EmcHostDisk -ID *Drive8*

C:\PS>Get-EmcHostDisk \\?\PhysicalDrive8

C:\PS>Get-EmcHostDisk *Drive8*

This example gets the host disks of all connected host systems with the specified HostDiskIdentifier, MbrDiskSignature, or GptDiskGuid (accepts wildcard).

 

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

C:\PS>$l = Get-EmcLUN  mylun*

C:\PS>$l

C:\PS>Get-EmcHostDisk -Lun $l

C:\PS>$l | Get-EmcHostDisk

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

C:\PS>$h | Update-EmcSystem

C:\PS>$l | Get-EmcHostDisk -hostsystem $h

C:\PS>$s = Get-EmcStorageSystem

C:\PS>$s | Update-EmcSystem -Silent

C:\PS>$s.Luns | Get-EmcHostDisk foo*

C:\PS>$c = Get-EmcClusterSystem

C:\PS>$l = Get-EmcStoragePool gold* | Get-EmcLUN

C:\PS>$l | Get-EmcHostDisk -ClusterSystem $c

This example gets the host disks associated with the specified LUN object.

 

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

C:\PS>Get-EmcHostVolume | Get-EmcHostDisk

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

C:\PS>$h | Update-EmcSystem

C:\PS>$v = Get-EmcHostVolume c:* -HostSystem $h

C:\PS>$v | Get-EmcHostDisk

This example gets the host disks associated with the specified volume object.

 

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

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

C:\PS>$lun = Get-EmcLun myLunForCluster

C:\PS>Get-EmcHostDisk -Lun $lun - ClusterSystem $cluster

This example gets the host disks associated with a cluster system and a LUN.

 

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

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

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

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

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

This example gets the host disks associated with a cluster system and a volume.

 

-------------- Example 9 --------------

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

C:\PS>Get-EmcHostDisk -ClusterSystem $cluster -AllNodeHostdisk

This example gets all host disks on the specified cluster.

 

-------------- Example 10 --------------

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

C:\PS>Get-EmcHostDisk -ClusterSystem $cluster -ClusteredHostdisk

This example gets all host disks that are clustered on the specified cluster.

 

-------------- Example 11 --------------

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

C:\PS>$nodes = Get-EmcClusterNode -ClusterSystem $cluster

C:\PS>Get-EmcHostDisk -ClusterNode $nodes[0]

This example gets all host disks on the specified node.

 

-------------- Example 12 --------------

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

C:\PS>Get-EmcHostDisk -MailboxDatabase $db -MailboxDatabaseFileType edbFile

This example gets the host disks for edbfile that are associated with the specified mailbox database.

 

-------------- Example 13 --------------

C:\PS>$dbCopy= Get-EmcMailboxDatabaseCopy rvdb*

C:\PS>Get-EmcHostDisk -MailboxDatabaseCopy $dbCopy[0] -MailboxDatabaseFileType edbFile

This example gets the host disks for edbfile that are associated with the specified mailbox database copy.