powershellscripts.com

Tutorials  PowerShell Cmdlet Help for New-Cluster



NAME
New-Cluster

SYNOPSIS
Creates a new cluster.

SYNTAX
New-Cluster [-HARestartPriority ] [-HAIsolationResponse ] [-VMSwapfilePolic
y ] [-Name] -Location [-HAEnabled] [-HAAdmissionControlEnabled] [-HAFailov
erLevel ] [-DrsEnabled] [-DrsMode ] [-DrsAutomationLevel ] [-Server >] [-WhatIf] [-Confirm] []


DESCRIPTION
Creates a new cluster with the provided inputs, in the location that is specified by the Location parameter.
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
Indicate that 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.

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 that is specified by the VMSwapfileDatastoreID property o
f the virtual machine host. If the VMSwapfileDatastoreID property is not set or indicates a datastore with unsu
fficient free space, store the swapfile in the same directory as the virtual machine. This setting might degrad
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

-Name
Specify the name of the new cluster.

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

-Location
Specify the location where you want to place the new cluster. If a datacenter is specified for the -Location pa
rameter, the cluster is created in its "hostFolder" folder. The "hostFolder" is a system folder and is guarante
ed to exist.

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

-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 virtual machines cannot be powered on if they violate availability constraints.

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

-HAFailoverLevel
Specify a configured 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
1 to 4.

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. The valid values are FullyAutomated, Manual, and PartiallyAutomated
.

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

-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

-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>$engineeringFolder = Get-Folder Engineering

New-Cluster -Location Folder -Name Cluster -DRSEnabled -DRSMode FullyAutomated


Creates a new cluster named Cluster in the Folder folder.






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