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?
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.