Posted On March 28, 2019

How to Setup Microsoft Failover Cluster with PowerShell

kimconnect 0 comments
blog.KimConnect.com >> Database >> 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 *

Related Post

Check Servers NSLookup of a Listener to Match Active Node IP

$servers="SQL01","SQL02","SQL03","SQL04" $listener="halistener01" $activeNode="10.10.10.5" # Dynamic Credential method 1 $who = whoami if ($who.Substring($who.length-2, 2)="-admin"){$username=$who;} else…

Install phpMyAdmin in Centos 5.3

# Prerequisite: must install RPMForge Repo prior   yum install httpd php php-mysql php-gd php-mbstring…

Microsoft SQL Server Connection Timeout

Error Message: Resolution: a. Check SQL Server's Query Execution Timeout: SSMS > Login > Tools…
Other project: DragonCoin.com