Very short note (Win2K3/Win2K8/Win2K12) on just a few popular cluster commands.

Date : 01/03/2014
Version: 0.1
By: Albert

1. The "cluster" command:

1.1 Listing information:

- Get all cluster names as registered in DNS:

C:\TEMP> cluster /list

Cluster Name

- Get the properties for SQLCLUS3:

C:\TEMP> cluster SQLCLUS3 /prop

Produces a listing of properties for 'SQLCLUS3'

- Get version info of a Cluster:

C:\TEMP> cluster SQLCLUS3 /ver

Cluster Name: SQLCLUS3
Cluster Version: 5.2 (Build 3790: Service Pack 2)
Cluster Vendor: Microsoft(R) Cluster service

- List the nodes of a Cluster:

C:\TEMP> cluster node

- Get Quorum information of a Cluster:

C:\TEMP> cluster /quorum

- Get a list of all disks of a Cluster:

C:\TEMP> cluster SQLCLUS3 res

- You can use the "cluster restype" command to display a full list of resource types, as follows:

C:\TEMP> cluster restype

- You can use the "cluster restype" command to display a full list of resource types, as follows:

1.2 Modifying a Cluster:

- A cluster group named "SQLServerGroup" on cluster "SQLCLUS3" needs to brought offline and then back online.

C:\TEMP> cluster /cluster:SQLCLUS3 group "SQLServerGroup"/offline

C:\TEMP> cluster /cluster:SQLCLUS3 group "SQLServerGroup"/online

- Example on how to move a "resource group" from the current node to another node:

C:\TEMP> cluster group "print1" /moveto:prod2

Note: if you have only a two-node cluster, you can just use /move without a node name.

As another example:

C:\TEMP> cluster . group "Cluster Group" /move:prod2

Here, the period means that we’re modifying the local cluster.
Or, the command in general form:

C:\TEMP> cluster SVCLUS3 group "Cluster Group" /move:prod2

- Example how to move some available storage into a new resource group:

C:\TEMP> cluster res "DataDisk" /move:"file server"

1.3 Creating a Cluster report:

C:\TEMP> cluster log /gen

Will create a report in %systemroot%\cluster\reports.

Some nice switches can be used like:

/Copy:directory (for example: /Copy:logs, where logs should be a direcory below "your current path").

/Span:minutes (for example /Span:30, so that your log will only contains entries from the last 30 minutes).

1.4 Creating a basic Cluster:

Say you use WinK8 Server. It needs the Server 2008 Failover Clustering feature, so make sure it's installed first on your nodes.
You can do that using the graphical server manager, or by using "servermanagercmd -install Failover-Clustering".

You can even create a cluster using cluster.exe. The following extremely simple example will only create the basic cluster,
and Resources still needs to be added. Also, observe that no "account" is listed, so you will be prompted.

C:\TEMP> cluster MYCLUSTER /create /ipaddress: /Nodes:"srv1","srv2"

Some defaults will be taken for granted. Actually, above is the most basic of all basics!
Other cluster features needs to be added later (possibly using the cluster command), like storage, applications etc..

2. Cluster related powershell commands: