Windows Server 2003
1829270 Members
12495 Online
109988 Solutions
New Discussion

commands to detemine if Cluster is running on this server?

 
Hanry Zhou
Super Advisor

commands to detemine if Cluster is running on this server?

I am not too good at batch commands, but I need to script the following:

1. to find out if MS Cluster is running on this server, I guess, by using command to see if Resources are available.

2. what is the command to determine if the command above is successful or not? which means if Resources are on or not

3. then continue to next, based on if Cluster is running or not..

Thanks in advance!
none
2 REPLIES 2
emha_1
Valued Contributor

Re: commands to detemine if Cluster is running on this server?

hi,


one possibility is to use %systemroot%\system32\cluster.exe that provides info about cluster and its resources.
unfortuantelly, it doesn't provide outptut that could be easily automated using limited cmd shell scripting features.

other possibility is to write e.g. vbs script, read out necessary cluster info from "MSCluster.Cluster" object and perform requested checks.

emha.
Hanry Zhou
Super Advisor

Re: commands to detemine if Cluster is running on this server?

I think "cluster resource /status" will tell me what node owns resources, and then based on this result, I will script next steps the logic should do.

But what is the command to extract the node name from the result? because there are a few lines and fields coming out as the result of this command.

Thanks,
none