How to Setup Microsoft Failover Cluster with PowerShell

First-time Setup:

New-Cluster -Name {CLUSTERNAME} -Node SERVER1,SERVER2 -NoStorage -StaticAddress IP1,IP2

# Add CLUSTERNAME$ into the NTFS permissions list of \\FILESERVER1\SHARE1 before this next command

Set-ClusterQuorum -NodeAndFileShareMajority “\\FILESERVER1\SHARE1”
Remove Cluster:Get-Cluster    #Check clustername on a particular host$nodes=”SERVER1″,”SERVER2″foreach ($node in $nodes){Remove-ClusterNode -Name $node -Force}

# Run this command on each node SERVER1 and SERVER2

Clear-Clusternode #on each node
Rebuild cluster:

New-Cluster -Name CLUSTER1-Node SERVER1,SERVER2,SERVER3-NoStorage -StaticAddress IP1,IP2

# Run this command on a DC to replicate changes immediately:  

repadmin /syncall on DC2

# Add CLUSTERNAME$ into the NTFS Permissions List of: \\FILESERVER1\ QUORUM

Set-ClusterQuorum -NodeAndFileShareMajority “\\FILESERVER1 \QUORUM”

# Place all nodes into same AD OU

# Check CLUSTERNAME to ensure that it has IPs for each subnet of its nodes.

# Add SecondIP to ClusterAdd-ClusterResource -Name SecondIP -ResourceType “IP Address” -Group “Cluster Group”

# Manually configure this new item using Failover Cluster Manager# On Dependencies tab of CLUSTERNAME, set OR conditions to depend on both IPs

# Edit each IP on Advanced Properties with appropriate owner(s) that are in the correct subnet

# Test Failover:

Move-ClusterGroup “Cluster Group” -node SERVER1

Move-ClusterGroup “Cluster Group” -node SERVER2

Move-ClusterGroup “Cluster Group” -node SERVER3

Leave a Reply

Your email address will not be published. Required fields are marked *