One of the major changes moving forward into Windows Server 2008 R2 is that some of the tools are being deprecated (I love that word) in favor of PowerShell.
Some people just screamed, “Wooo hooo, fantastic!” while others screamed, “Great, now I have to learn another tool after investing all of those years in the tools of the past!”
I, personally, take the first view point in that this is great news. It now forces me to start using PowerShell more than just in Exchange Server 2007. PowerShell will be the main tool in the future, so it is important to learn it now.
So, this is the perfect time to start talking about the differences and how we will now use PowerShell in Windows Server 2008 R2 failover clustering. Let’s start from the beginning.
Get-WindowsFeature in PowerShell will provide a list of all features and a checkbox will show whether they are installed or not.
Add-WindowsFeature Failover-Clustering will add the failover clustering feature along with the Remote Server Administrative Tools (RSAT) for Failover Clustering Tools.
From here on, it is all down hill. We have the feature installed, and the PowerShell module is imported. Like all PowerShell commands, the list can be broken down into Add, Block, Clear, Get, Grant, Move, New, Remove, Resume, Set, Start, Stop, Suspend, Test, and Update verbs. If you want to see a setting, you will generally use a Get verb combined with the noun describing what you want to find. For example, the Get-Cluster cmdlet will provide information about the cluster such as the domain name, the name of the cluster, and the description of the cluster along with several other bits of information. The various cmdlets related to failover clustering can be found by using the Get-Command –module FailoverClusters cmdlet. The resulting cmdlets are broken out by verb below.
Add cmdlets include the following:
There is only one block cmdlet for failover clustering, and it is used to block users from accessing the failover cluster.
There are two Clear cmdlets for failover clustering. Clear-ClusterDiskReservation is used to clear the persistent reservation on a disk. The Clear-ClusterNode is used to forcibly remove the failover cluster feature from a node.
The Get cmdlets are probably the most used. Get verbs allow for the easy retrieval of information about a failover cluster
The Grant verb is basically the reverse of the block verb. With the Grant-ClusterAccess cmdlet, you can provide full access to the failover cluster, and with the –readonly parameter, read only access can be provided.
The Move verb can be used to move resources between failover cluster nodes.
The New-Cluster cmdlet does just what it says it does. It creates new failover clusters.
The Remove verb is used to delete resources or to completely destroy the cluster by using the Remove-Cluster cmdlet.
The Resume verb is used to resume either the activity on a node after it has been suspended or to take a cluster disk or cluster shared volume out of maintenance mode.
The Set cmdlets are extremely powerful in that they can be used to make changes to the cluster resources and the cluster itself.
The Start verb is used to start the cluster service, for example with the Start-Cluster cmdlet, or to start groups or resources.
If there is a Start verb, then it makes sense that there is a Stop verb that does the exact opposite. For example, you can shut down the cluster by using the Stop-Cluster cmdlet or you can stop entire groups or individual resources by using the Stop cmdlets below.
The Suspend verb does the opposite of the Resume verb. The Suspend verb is used to pause a node by using the Suspend-ClusterNode cmdlet, and the Suspend-ClusterResource cmdlet will turn on maintenance mode for a disk resource or a cluster shared volume.
The Test-Cluster cmdlet is used to run the Validate tool. At first glace, you would think it would have been named something like Validate-Cluster, but to make the cmdlet consistent with other features and applications, the Test verb is used.
Update-ClusterIPResource is used to release the DHCP lease for IP Address resources and Update-ClusterVirtualMachineConfiguration is used to refresh the configuration settings when adding a new network adapter or to refresh other settings such as the virtual memory configuration for VMs running in the failover cluster.
To learn more about each command, use the help that is built into PowerShell. You will find that a simple command like, Get-Help CmdletName will retrieve some basic information, but if you extend it with the –full parameter or the –example parameter, and you can get an easy grasp of what you can do with the Cmdlet.