waCluster.wsf v1.1 (Jun 2005)

This is a script for administering/querying Win2K/Win2003 Cluster Services.
It can drain/stop/start NLB ports, IIS sites and NT Services.

___________

Download waCluster

___________

Usage: waCluster.wsf COMMAND [/wlbs:value] [/svc:value] [/site:value] [/prog:value] [/cond_cpu:value] [/cond_nodes:value] [/cond_prog:value] [/wait:value] [/nobeep] [/noconfirm] [/t] [/v] [/q] [/log:value] [/ver]

Options:

COMMAND    : START|STOP|RESTART|LIST
 START   : will start WLBS ports, services, processes
 STOP    : will (drain)stop WLBS ports, services, processes
 RESTART : will (drain)stop WLBS ports, services, processes and wait for signal to start everything up again
 LIST    : will list WLBS port rules/service names/…
wlbs       : WLBS ports concerned  (port1;port2;port3;…)
svc        : NT Services concerned (serv1;serv2;serv3;…)
site       : IIS site concerned    (site1;site2;site3;…)
prog       : Programs concerned    (prog1;prog2;prog3;…)
 
cond_cpu   : CPU level to check    (only proceed if CPU % busy is higher - use [;X] to test it X times)
cond_nodes : Min number of nodes   (only proceed if at least X nodes active)
cond_prog  : Program to check for  (only proceed if return code is not 0)
 
wait       : # seconds to wait after draining
nobeep     : No audio feedback (beep)
noconfirm  : No manual confirm between steps (DANGEROUS!)
 
t          : test    - show what would be executed without doing it
v          : verbose - show debug output during execution
q          : quiet   - show no output during execution
log        : logfile - log output in file
 if filename=’D’ use [script name].YYYYMMDD.log as log file
 if filename=’M’ use [script name].YYYYMM.log as log file
 if no filename given use [script name].log as log file
ver        : version - show version and license information
Examples:
waCluster.wsf RESTART /wlbs:2080;2443;8080 /svc:redirxx /prog:redirxx.exe /site:2080
  :: 1) WLBS DRAIN 2080,2443,8080
  :: 2) wait for user input
  :: 3) WLBS STOP 2080,2443,8080
  :: 4) STOP SITE(S) on port 2080
  :: 5) stop RedirXX service, kills RedirXX.exe process if it still runs
  :: 6) (user performs an upgrade and then lets the script continue)
  :: 7) start RedirXX service
  :: 8) START SITE(s) on port 2080
  :: 9) wait for user input
  ::10) WLBS START 2080,2443,8080 (=> service back online)

waCluster.wsf LIST /wlbs /svc /site
  :: 1) lists WLBS port rules that can be managed
  :: 2) lists all IIS Sites that can be managed
  :: 3) lists all NT Services that can be managed

waCluster.wsf RESTART /noconfirm /wlbs /svc:iis /cond_cpu:95 /wait:300
  :: 1) first, check if CPU % is above 95, only proceed if it is
  :: 2) drain all WLBS ports during 5 minutes (300 secs)
  :: 3) stop IIS - wait 5 minutes
  :: 4) start IIS
  :: 5) put node back in the WLBS cluster
*** HISTORY ***
* v1.1 - 2005-06-06 - Conditional restart (CPU/nodes)
* v1.0 - 2004-02-24 - First public release