Syntax
Set-Cluster [-HARestartPriority <HARestartPriority>] [-HAIsolationResponse <HAIsolationResponse>] [-VMSwapfilePolicy <VMSwapfilePolicy>] [-Cluster] <Cluster[]> [[-Name] <String>] [-HAEnabled <Boolean>] [-HAAdmissionControlEnabled <Boolean>] [-HAFailoverLevel <Int32>] [-DrsEnabled <Boolean>] [-DrsMode <DrsMode>] [-DrsAutomationLevel <DrsAutomationLevel>] [-VsanEnabled <Boolean>] [-VsanDiskClaimMode <VsanDiskClaimMode>] [-Profile <VMHostProfile>] [-EVCMode <String>] [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]Related Commands
Online versionDetailed Description
This cmdlet modifies the configuration of a cluster.Parameters
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Cluster | Cluster[] | Specifies the name of the cluster you want to configure. | true | true (ByValue) | |
Name | String | Specifies a new name for the cluster. | false | false | |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | |
DrsAutomationLevel | DrsAutomationLevel | Specifies a DRS (Distributed Resource Scheduler) automation level. The valid values are FullyAutomated, Manual, and PartiallyAutomated. | false | false | |
DrsEnabled | Boolean | Indicates that VMware DRS (Distributed Resource Scheduler) is enabled. | false | false | |
DrsMode | DrsMode | This parameter is deprecated and scheduled for removal. Use the DrsAutomationLevel parameter instead.
Specifies a DRS (Distributed Resource Scheduler) mode. The valid values are FullyAutomated, Manual, and PartiallyAutomated. | false | false | |
EVCMode | String | Specifies the VMware Enhanced vMotion Compatibility (EVC) mode of the newly created cluster. If not specified or set to $null, EVC is disabled. | false | false | |
HAAdmissionControlEnabled | Boolean | Indicates that the virtual machines in the cluster will not start if they violate availability constraints. | false | false | |
HAEnabled | Boolean | Indicates that VMware High Availability is enabled. | false | false | |
HAFailoverLevel | Int32 | Specifies a failover level. This is the number of physical host failures that can be tolerated without impacting the ability to meet minimum thresholds for all running virtual machines. The valid values range from one to four. | false | false | |
HAIsolationResponse | HAIsolationResponse | Specifies whether the virtual machine should be powered off if a host determines that it is isolated from the rest of the compute resource. The valid values are PowerOff and DoNothing. Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release. | false | false | |
HARestartPriority | HARestartPriority | Specifies the cluster HA restart priority. The valid values are Disabled, Low, Medium, and High. VMware HA is a feature that detects failed virtual machines and automatically restarts them on alternative ESX/ESXi hosts. Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release. | false | false | |
Profile | VMHostProfile | Specifies a host profile you want to associate with the cluster. If the value of this parameter is $null, the current profile association is removed. | false | false | |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the VMware PowerCLI console. | false | false | |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false | |
VMSwapfilePolicy | VMSwapfilePolicy | Specifies the swapfile placement policy. The following values are valid:
InHostDataStore - Store the swapfile in the datastore specified by the VMSwapfileDatastoreID property of the virtual machine host. If the VMSwapfileDatastoreID property is not set or indicates a datastore with insufficient free space, the swapfile is stored in the same directory as the virtual machine. This setting might degrade the VMotion performance. WithVM - Store the swapfile in the same directory as the virtual machine. | false | false | |
VsanDiskClaimMode | VsanDiskClaimMode | Specifies the mode by which disks are claimed by the Virtual SAN. | false | false | |
VsanEnabled | Boolean | Specifies whether the Virtual SAN feature is enabled on this cluster. | false | false | |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |
Return Type
Zero or more modified Cluster objectsNotes
Examples
-------------- Example 1 --------------
Get-Cluster -Name "MyClusterName" | Set-Cluster -Name "NewClusterName" -HAEnabled:$true -HAAdmissionControlEnabled:$true -HAFailoverLevel 2 -VMSwapfilePolicy "InHostDatastore" -HARestartPriority "Low" -HAIsolationResponse "PowerOff"
Renames the "MyClusterName" cluster to "NewClusterName" and changes its VMware HA (Hgh Availability) settings.
-------------- Example 2 --------------
Set-Cluster -Cluster "MyClusterName" -DRSEnabled:$true -DRSAutomationLevel "Manual"
Changes the VMware DRS (Distributed Resource Scheduler) settings of the "MyClusterName" cluster.
-------------- Example 3 --------------
Set-Cluster -Cluster "MyClusterName" -EVCMode "intel-nehalem"
Changes the VMware EVC (Enhanced vMotion Compatibility) settings of the "MyClusterName" cluster.