Set-EmcHostDiskOnlineState

Changes the online state of the specified disk.

 

Syntax

 

Parameters

-HostDisk <Disk>

Attributes: Required, Position: named

Specifies the ESI host disk object, which you can get from the ESI host system object or by using the Get-EmcHostDisk or Find-EmcHostDisk cmdlets.

 

-Online <SwitchParameter>

Attributes: Required, Position: named

Changes the disk state to online.

 

-Silent <SwitchParameter>

Attributes: Optional, Position: named

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

 

-Offline <SwitchParameter>

Attributes: Required, Position: named

Changes the disk state to offline.

 

<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>$h = Get-EmcHostSystem *.148

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

C:\PS>$h.HostDisks | select hostdiskidentifier

HostDiskIdentifier

------------------

\\?\PhysicalDrive4

\\?\PhysicalDrive7

\\?\PhysicalDrive1

\\?\PhysicalDrive2

\\?\PhysicalDrive3

\\?\PhysicalDrive5

\\?\PhysicalDrive6

C:\PS>$hd = $h.HostDisks[1]

C:\PS>Set-EmcHostDiskOnlineState -HostDisk $hd -Offline

This example changes the disk state to offline.

 

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

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

C:\PS>$h.RefreshDisks()

C:\PS>$h.HostDisks | select hostdiskidentifier

HostDiskIdentifier

------------------

\\?\PhysicalDrive4

\\?\PhysicalDrive7

\\?\PhysicalDrive1

\\?\PhysicalDrive2

\\?\PhysicalDrive3

\\?\PhysicalDrive5

\\?\PhysicalDrive6

C:\PS>$hd = $h.HostDisks[1]

C:\PS>Set-EmcHostDiskOnlineState -HostDisk $hd -Online

This example changes the disk state to online.