Edit

Share via


Enable-StorageHighAvailability

Enables a disk to be added to the failover cluster.

Syntax

ByDiskNumber (Default)

Enable-StorageHighAvailability
    [-DiskNumber] <UInt32[]>
    [-ScaleOut <Boolean>]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [-PassThru]
    [<CommonParameters>]

ByDiskUniqueId

Enable-StorageHighAvailability
    -DiskUniqueId <String[]>
    [-ScaleOut <Boolean>]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [-PassThru]
    [<CommonParameters>]

ByDiskName

Enable-StorageHighAvailability
    -DiskFriendlyName <String[]>
    [-ScaleOut <Boolean>]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [-PassThru]
    [<CommonParameters>]

ByDiskPath

Enable-StorageHighAvailability
    -DiskPath <String[]>
    [-ScaleOut <Boolean>]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [-PassThru]
    [<CommonParameters>]

InputObject (cdxml)

Enable-StorageHighAvailability
    -InputObject <CimInstance[]>
    [-ScaleOut <Boolean>]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [-PassThru]
    [<CommonParameters>]

Description

The Enable-StorageHighAvailability cmdlet enables a clusterable disk that is not yet a cluster resource to be added to the failover cluster.

Examples

Example 1: Enable a disk in a failover cluster by using its ID

This command uses the Get-Disk cmdlet to display the properties of disk number 9.
PS C:\>Get-Disk -Number 9 | Format-Table -Property Number,IsHighlyAvailable,IsClustered,IsScaleOut
Number IsHighlyAvailable IsClustered IsScaleOut
------ ----------------- ----------- ----------
     9             False       False      False

The next command enables disk number 9. The final command repeats the first command to display the new status of the disk.
PS C:\>Enable-StorageHighAvailability -DiskNumber 9
PS C:\> Get-Disk -Number 9 | Format-Table Number,IsHighlyAvailable,IsClustered,IsScaleOut
Number IsHighlyAvailable IsClustered IsScaleOut
------ ----------------- ----------- ----------
     9              True        True       True

This command enables a shared disk to be added to the failover cluster and made a Cluster Shared Volume by using the disk number as the identifier of the disk to enable.

Example 2: Enable a disk for failover cluster without it being enabled for Cluster Shared Volumes

This command uses **Get-Disk** to display the properties of disk number 9.
PS C:\>Get-Disk -Number 9 | Format-Table -Property Number,IsHighlyAvailable,IsClustered,IsScaleOut

Number IsHighlyAvailable IsClustered IsScaleOut
------ ----------------- ----------- ----------
     9             False       False      False


The next command enables disk number 9. The command specifies a value of 0 for the *Scaleout* parameter. This command leaves the disk in available storage and not enabled. The final command repeats the first command to display the new status of the disk.
PS C:\>Enable-StorageHighAvailability -DiskNumber 9 -ScaleOut 0
PS C:\> Get-Disk -Number 9 | Format-Table Number,IsHighlyAvailable,IsClustered,IsScaleOut

Number IsHighlyAvailable IsClustered IsScaleOut
------ ----------------- ----------- ----------
     9              True        True      False

This example enables a shared disk to be added to the failover cluster and made a Cluster Shared Volume by using the disk number. The example makes the disk available but enabled for Cluster Shared Volume.

Parameters

-AsJob

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CimSession

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

Parameter properties

Type:

CimSession[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:Session

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DiskFriendlyName

Specifies an array of friendly names for disks.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByDiskName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-DiskNumber

Specifies an array of disk numbers.

Parameter properties

Type:

UInt32[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByDiskNumber
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-DiskPath

Specifies an array of disk paths.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByDiskPath
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-DiskUniqueId

Specifies an array of disk IDs.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:DiskId

Parameter sets

ByDiskUniqueId
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-InputObject

Specifies the input object that is used in a pipeline command.

Parameter properties

Type:

CimInstance[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

InputObject (cdxml)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ScaleOut

The Enable-StorageHighAvailability cmdlet enables a clusterable disk that is not yet a cluster resource to be added to the failover cluster.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ThrottleLimit

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Notes

  • When used in Failover Cluster, cmdlets from the Storage module operate on cluster level (all servers in the cluster).