O'Reilly logo

Windows PowerShell™ Scripting Guide by Ed Wilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Managing Nodes

After the cluster is created, one task that needs to be performed from time to time is to add or evict nodes on the cluster. To do this, use the MSCluster_Cluster WMI class and use either the add() or evict() method. An example of a script that does this is the AddNodeEvictNode.ps1 script.

Adding and Evicting Nodes

Begin the AddNodeEvictNode.ps1 script with the param statement and define several command-line parameters for the script: the -computer, -namespace, and -help parameters, which are included in all the scripts in this chapter. You'll also have the -node parameter, which does not have a default value assigned to it. You'll also create several switch parameters: -add, -evict, -list, -whatif, and -help. The use of the switch ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required