How to use Powershell in Failover Clustering–Part 1

Powershell is a really powerful toy for any Windows administrator where tasks need to be automated and or repeated several times.

Here I would like to start an blog series of how to use Powershell in Windows Server Failover Cluster (WSFC) environments.

Let’s start over with some basic commandlet’s to get status of clustered groups, resources and cluster core resources, move groups and soon. Later we will do some advanced operations with Powershell.

The WSFC Powershell (CLI) interface is everywhere available where WSFC feature is installed:

  • Windows Server 2008 R2 (SP1)
    • Full
    • Core (not installed by default)
  • Microsoft Hyper-V Server 2008 R2 (SP1)
  • Remote Server Administration Tools (RSAT) for Windows 7 (SP1)

First of all, you must import the “FailoverCluster” module to get the commandlet’s. To get a list of all available modules you can use:

PS:\ Get-Module -ListAvailable


To import the module you need to use “Import-Module” commandlet:

PS:\ Import-Module FailoverClusters


YUHUU Smile We have now the full set of all Failover Cluster commandlet’s available, let’s have a look which they are:

PS:\ Get-Command –Module FailoverClusters or Get-Command | findstr Cluster



As you can see, there are for the most of the GUI actions an cmdlet available, sometimes more. In total there are 69 Failover Cluster specific cmdlet’s which gives you many many *creative* usage ways.

NOTE: A really helpful method with Powershell is the Get-Help cmdlet:
Built-in help:
Get-Help cmdlet -Full
Get-Help cmdlet –Examples
Online help (INET connection is required):
Get-Help cmdlet –Online

Let’s start with some easy commandlet to do some basic operations:

How to get a list of all clustered groups via Powershell?

PS:\ Get-ClusterGroup



As you can see I do have some resources offline. Let’s bring them online

How to bring online a Cluster Group via Powershell?

PS:\ Start-ClusterGroup “GROUPNAME” image

Now, let’s move a group to a different node to balance the workloads in my *test* cluster Smile

How to move a cluster group via Powershell?

PS:\ Move-ClusterGroup “GROUPNAME” –Node “NODENAME”


How to get a list of all clustered resources via Powershell?

PS:\ Get-ClusterResource


How to get a list of all clustered groups from an node via Powershell?

PS:\ Get-ClusterNode –Name “NODENAME” | Get-ClusterGroup


How to get a list of all clustered resources within a cluster group via Powershell?

PS:\  Get-ClusterGroup "GROUPNAME" | Get-ClusterResource


How to get more parameters from a clustered disk (resource)?

PS:\ Get-ClusterResource "Cluster Disk 1" | Get-ClusterParameter



How can I test/validate my cluster via Powershell?

Since R2 you can also validate your cluster via CLI Powershell:

PS:\ Get-Help Test-Cluster

A.e.: PS:\ Test-Cluster –Node Node1,Node2



A list of all available Test-Cluster scenarios - which can be *in-/excluded*- can you find here:


Hope this has opened your interest in more around Powershell for Failover Clustering - stay tuned for more or start with playing with PS…..Winking smile

Some additional reference can you find here:

Mapping Cluster.exe Commands to Windows PowerShell Cmdlets for Failover Clusters

PowerShell Quick Reference

Clustering with PowerShell

PowerShell for Failover Clustering: Finding the Drive Letter

PowerShell for Failover Clustering: Understanding Error Codes

PowerShell for Failover Clustering: Frequently Asked Questions


Ramazan Can

Comments (6)
  1. hyper-v says:

    I had no idea how effective a smaller server core is at reducing security breaches. Something I’ve got to keep in mind in the future.

  2. shan says:

    Hi Ramazan,
    We have 2nodes windows 2008R2 cluster,where SQL & SAP database is running, last 3 months we are facing very poor performance.sometimes windows cluster is going hangs,we have already logged the call with Microsoft,but we have not getting any solution, your help will be appreciate..

    1. Hi Shan,

      Generally performance issues to analyze are really hard in a forum as there is a broad range of involved areas where a bottleneck can sit 🙂 especially in SQL areas where I/O plays a key role I would generally start looking on disk que lengths, just to make sure before digging deeper into root cause analyses…. 😉

      Let me know if you have any further question on this

      Ramazan Can

  3. Hector says:

    I am unable to load the failover cluster module on my Win 7 machine because it isn’t listed. I’ve installed RSAT SP1 and have enabled the Failover Clustering Tools feature. I can see/access the Failover Cluster Manager gui in my admin tools folder. I have the x64 version of Win 7 installed on my system. I disabled and re-enabled the Failover Clustering Tools feature and I still can’t see the FailOver module when I run Get-Module -ListAvailable. It just isn’t there.

    What am I missing?

    1. right – this is “by design” 🙂 Failover cluster powershell module rely on Failover cluster service which isnt available on your WIn7 box. you can workaround and powershell into a node with “New-PSSession” and use there FC module.

      Hope that helps

Comments are closed.

Skip to main content