Here’s a quick post about how great PowerShell can be for your clusters.
I’m in the middle of configuring a few machines in clusters and recently added a new node to a cluster that was already built (but not configured). I needed to have that final node be a possible owner for all 33 presented disks on that cluster. To do that through the cluster GUI would require a heck of a lot of mouse clicks….PowerShell to the rescue!
The Windows PowerShell Modules (under Administrative Tools) allow you to do all kinds of wonderful things with clusters.
Allowing a single disk to be owned by the extra server is as simple as:
CLUSTER RESOURCE "Cluster Disk 1" /addowner:DBSERVER1
If I want to do that for 33 disks a quick PowerShell one-liner takes care of it:
$i=1;do {cluster resource `"Cluster Disk $i`" /addowner:DBSERVER1;$i = $i +1} while ($i -lt 33)
Here’s a version that’s a little more readable:
$DiskNo = 1
DO
{ CLUSTER RESOURCE `"Cluster Disk $DiskNo`" /addowner:DBSERVER1
$DiskNo = $DiskNo+1
}
WHILE ($DiskNo -lt 33)
Quick and easy. Saved my clicky finger lots of work.
More PowerShell and cluster fun coming up in the next few weeks.
Quick and easy. Saved my clicky finger lots of work.-fashion UGG Boots
LikeLike
YHJHHBBNMCXCHHOOP WHITE LAMBS SELL TOP QUALITY, 100% AUSTRALIAN MADE, FASHIONABLE UGG BOOTS DIRECT TO THE UK PUBLIC ATTHE BEST PRICES. EVERY YHJHHBBNMCXCHHOOPugg boots,cheap ugg boots,ugg boots sale,ugg boots sale uk,cheap ugg boots uk,ugg 5803,UGG Bailey Button Triplet,UGG Classic Cardy,UGG Classic Mini,UGG Classic Short,ugg 5815,ugg 5825,ghd hair straightener,ghd hair straightener australia,ghd hair straighteners,ghd outlet,ghd straighteners,ghd australia,GHD Dark,GHD Deluxe Midnight Collection,GHD Gold,GHD Green Envy Styler,GHD IV salon styler,GHD IV Styling Set,GHD Kiss,GHD MK4,GHD MK4 Pink,moncler jackets,moncler coats,moncler outlet,moncler vest,NOW IS A GREAT TIME TO BUY THESE AUSTRALIAN UGG BOOTS AS A GIFT.
LikeLike