PowerShell Lab Complete!

You've mastered failover clustering PowerShell management!

Take the Quiz → Try GUI Lab

Cluster Setup & Validation

1. Install Clustering Feature
Install the Failover Clustering Windows feature with management tools.
Install-WindowsFeature Failover-Clustering -IncludeManagementTools
2. Validate Cluster Configuration
Run cluster validation tests on prospective nodes to check readiness.
Test-Cluster -Node NODE1,NODE2,NODE3
3. Create a New Cluster
Create a new failover cluster with a static IP address.
New-Cluster -Name "HexCluster" -Node NODE1,NODE2 -StaticAddress 10.0.1.100
4. Add a Node to the Cluster
Add a third server node to the existing cluster.
Add-ClusterNode -Name "NODE3" -Cluster "HexCluster"

Cluster Information

5. Get Cluster Information
View the cluster name, domain, and configuration details.
Get-Cluster
6. List Cluster Nodes
Display all nodes in the cluster and their online/offline status.
Get-ClusterNode
7. View Cluster Resources
List all individual resources (disks, IPs, services) in the cluster.
Get-ClusterResource
8. View Cluster Roles
List all clustered roles (VMs, file servers, SQL instances).
Get-ClusterGroup

Quorum & Shared Storage

9. Check Quorum Configuration
View the current quorum model and witness resource.
Get-ClusterQuorum
10. Set Quorum Witness
Configure a file share witness for the cluster quorum.
Set-ClusterQuorum -FileShareWitness "\\FS01\ClusterWitness"
11. View Cluster Shared Volumes
List all CSVs and their owner nodes and mount paths.
Get-ClusterSharedVolume

Node & Role Management

12. Suspend a Node for Maintenance
Pause a node and drain all roles to other nodes before maintenance.
Suspend-ClusterNode -Name "NODE2" -Drain
13. Resume a Paused Node
Bring a paused/drained node back online after maintenance.
Resume-ClusterNode -Name "NODE2"
14. Move a Cluster Role
Manually move a VM or service to a different cluster node.
Move-ClusterGroup -Name "SQL-AG" -Node "NODE02"
Cluster Module:
Use Get-Command -Module FailoverClusters to see all clustering cmdlets. Key verbs: Get, Set, New, Add, Remove, Move, Suspend, Resume, Test.
Tip: Always run Test-Cluster before making cluster changes. A healthy cluster should pass all validation tests before adding nodes or modifying quorum.
Quorum Models:
Node Majority - Odd number of nodes vote
Node + Disk Witness - Nodes + shared disk vote
Node + File Share Witness - Nodes + SMB share vote
Cloud Witness - Uses Azure Blob storage
Cluster Shared Volumes (CSV): CSVs allow multiple nodes to simultaneously read/write to the same LUN. All nodes see the volume at C:\ClusterStorage\. This is essential for Hyper-V live migration and Scale-Out File Server.
Failover vs. Failback:
Failover - Automatic move of a role to a healthy node when the owner fails.
Failback - Optional return of a role to its preferred owner after recovery.
Configure preferred owners with Set-ClusterOwnerNode.
Cluster-Aware Updating (CAU):
Use Invoke-CauRun to orchestrate rolling Windows Updates across cluster nodes with zero downtime. CAU drains each node, applies updates, reboots, then moves to the next node automatically.
Live Migration Pre-checks: Before moving a VM between cluster nodes, verify: compatible processor features, same virtual switch names, sufficient memory on the target node, and that CSV paths are accessible from all nodes.
Cluster Network Roles:
0 - Do not allow cluster network communication
1 - Cluster only (heartbeat, internal communication)
3 - Allow all (cluster + client traffic, default)
Set with (Get-ClusterNetwork "Network Name").Role = 1