Cannot run PowerShell cluster cmdlets from a standalone server

15.5k views Asked by At

I have a terminal server which is a standalone server and 4 database servers (remote servers) which employ the Windows Failover Cluster Manager. I have the requirement of getting the cluster status of all the DB servers and the command which I am using is

Get-ClusterGroup -Cluster ClusterServerName

While this command works perfectly fine when run from one of the database servers, if I try to execute the same command from the terminal server, it gives the following error:

Get-ClusterGroup : The term 'Get-ClusterGroup' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

I have checked the PowerShell version for both the terminal server and the remote computers and they are same (v4.0). Is there a way I can run the above command from terminal server itself?

3

There are 3 answers

1
Ranadip Dutta On BEST ANSWER

The cmdlets that are associated with Windows Failover Clustering are part of a module called FailoverClusters. This module isn't loaded by default when you first launch PowerShell, even from the console of your cluster nodes. To load this cmdlet:

Import-Module FailoverClusters

you can always get a listing of the available modules using

Get-Module -ListAvailable

If the module is not present, then you should download it and then do the import of the psm1 file

Go through the documentation also for this:

FailOver Cluster Module Usage

Hope it helps

0
Sid On

The standalone server does not have the failover cluster module installed. You can install it from the Roles and Features menu in Server Manager. It will be in the features page. once installed, your error wont show up again.

In PowerShell Version 3.0 and above, you do not have to explicitly load a module. It will automatically be loaded once a command from the module is called.

0
Michel Jung On

I'm not sure if the accepted answer was correct for an older Version but for me on Powershell 5.1.x this was needed instead:

Import-Module Microsoft.SME.FailoverCluster