PoSh script to add new host to existing Windows failover cluster

Here’s another quick one – this one add a new host to existing Windows 2012 R2 failover cluster:

Clear-Host
Write-Host "This script assumes you've run the cluster validation wizard before adding a new host to an existing cluster. Ensure latest AV version, multipathing software and patches have been installed before proceeding"
Write-Host "Press x key and enter to cancel OR any other key and enter to continue..."
$continue = Read-Host
If ($continue -eq "x")
{exit}
else
{
$cluster = Write-Host "Enter cluster's name (not FQDN!!)"
$host1 = Write-Host "Enter host's name (not FQDN!!)"

#$host2 = Write-Host "Enter second host's name (not FQDN!!)" - Remove hash tag to use
#$host3 = Write-Host "Enter host's name (not FQDN!!)" - Remove hash tag to use

Add-ClusterNode -Cluster $cluster -Name $host1
}

Leave a Comment

Your email address will not be published.