Powershell – How to get cluster information remotely via Powershell

clusterpowershellwmi

I've been trying to find a good way to gather various pieces of a windows cluster setup remotely, preferably via WMI, as we are not yet at a point where Powershell remoting is implemented (and I know this problem goes away with that).

I know I can use the following to get the current node:

Get-WmiObject Win32_ComputerSystem -ComputerName RemoteServer1 | Select Name

I also need the name property of Get-Cluster, which I can't figure out how to get from a remote system.

Is there something out there, or should I wait it out until Remoting gets implemented?

I'm a newbie to all things clustering, just a dba looking to inventory our servers properly. Thanks for any help!

Best Answer

I've written some functions which use the WMI cluster classes to get information remotely. As an added benefit, unlike the cluster module provided by Microsoft which only works against 2008 R2 and 2012, the WMI approach also works against 2003 and 2008 clusters.

http://poshcode.org/2886