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 ...
Get Windows PowerShell™ Scripting Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.