powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Set-Cluster



NAME
Set-Cluster

SYNOPSIS
Changes the configuration of a cluster.

SYNTAX
Set-Cluster [-HARestartPriority ] [-HAIsolationResponse ] [-VMSwapfilePolic
y ] [-Cluster] [[-Name] ] [-HAEnabled []] [-HAAdmissionControlEnable
d []] [-HAFailoverLevel ] [-DrsEnabled []] [-DrsMode ] [-DrsAutomationLevel utomationLevel>] [-Profile ] [-Server ] [-RunAsync] [-WhatIf] [-Confirm] [ ers>]


DESCRIPTION
Changes the configuration of a cluster.
HAEnabled is automatically set to $true if some of the HA settings, HAAdmissionControlEnabled, HAFailoverLevel, HAR
estartPriority, HAIsolationResponse, are specified.
DrsEnabled is automatically set to $true if some of the DRS settings, DrsAutomationLevel, DrsMode, are specified.


PARAMETERS
-HARestartPriority
Specify the cluster HA restart priority. The valid values are Disabled, Low, Medium, and High. VMware HA is a f
eature that detects failed virtual machines and automatically restarts them on alternative ESX hosts. Passing v
alues to this parameter through a pipeline is deprecated and will be disabled in a future release.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-HAIsolationResponse
Specify whether the virtual machine should be powered off if a host determines that it is isolated from the res
t of the compute resource. The valid values are PowerOff and DoNothing. Passing values to this parameter throu
gh a pipeline is deprecated and will be disabled in a future release.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-VMSwapfilePolicy
Specify the swapfile placement policy. The following values are valid:

InHostDataStore - Store the swapfile in the datastore specified by the VMSwapfileDatastoreID property of the vi
rtual 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 th
e VMotion performance.


WithVM - Store the swapfile in the same directory as the virtual machine.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Cluster
Specify the name of the cluster you want to configure.

Required? true
Position? 2
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? true

-Name
Specify a new name for the cluster.

Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false

-HAEnabled []
Indicate that VMware High Availability is enabled.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-HAAdmissionControlEnabled []
Indicate that the virtual machines in the cluster will not start if they violate availability constraints.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-HAFailoverLevel
Specify 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 fou
r.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-DrsEnabled []
Indicate that VMware DRS (Distributed Resource Scheduler) is enabled.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-DrsMode
This parameter is deprecated and scheduled for removal. Use the DrsAutomationLevel parameter instead. Specify a
DRS (Distributed Resource Scheduler) mode. MuThe valid values are FullyAutomated, Manual, and PartiallyAutomat
ed.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-DrsAutomationLevel
Specify a DRS (Distributed Resource Scheduler) automation level. The valid values are FullyAutomated, Manual, a
nd PartiallyAutomated.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Profile
Specify a host profile you want to associate with the cluster. If the value of this parameter is $null, the cur
rent profile association is removed.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-Server
Specify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the co
mmand runs on the default servers. For more information about default servers, see the description of Connect-V
IServer.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-RunAsync
Indicate that the command returns immediately without waiting for the task to complete. In this mode, the outpu
t of the cmdlet is a Task object. For more information about the -RunAsync parameter run " help About_RunAsync"
in the vSphere PowerCLI console.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-WhatIf
Indicate that the cmdlet is run only to display the changes that would be made and actually no objects are modi
fied.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

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

Required? false
Position? named
Default value $true
Accept pipeline input? false
Accept wildcard characters? false


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
Cluster


NOTES




-------------- Example 1 --------------

C:\PS>$cluster1 = New-Cluster -Name Cluster1 -Location Datacenter

$cluster2 = Set-Cluster -Cluster $cluster1 -Name Cluster2


Creates a new cluster named Cluster1 on the Datacenter. Then renames the cluster to Cluster2.






RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Set-Cluster.html
Get-Cluster
New-Cluster
Move-Cluster
Remove-Cluster