Subscribe to Windows IT Pro
October 29, 2010 01:00 PM

Q. What's the mapping between cluster.exe commands and PowerShell cluster commands?

Windows IT Pro
InstantDoc ID #128784
Rating: (0)

A. Microsoft continues to push the command line tools administrators have used for years into the PowerShell space. With Windows Server Failover Clustering (WSFC), much of that migration happens upon upgrading to Windows Server 2008 R2. If you're a Hyper-V shop, you need to know clustering, so you should probably brush up on its new PowerShell functionality.

Every single cluster.exe command has an equivalent in PowerShell now. Many of the PowerShell versions of these commands are shorter than their cluster.exe equivalents. A few you'll find yourself using regularly are:

cluster group {groupName} /move

Move-ClusterGroup {groupName}

Moves a cluster group to another node.

cluster resource "{resourceName}" /online

Start-ClusterResource "{resourceName}"

Starts a cluster resource.

cluster resource /prop

Get-ClusterResource | fl *

Displays cluster resource information.

cluster node /status

Get-ClusterNode

Displays status of all cluster nodes.

 

Server 2008 R2 and PowerShell also add twelve new commands that weren't exposed in cluster.exe. Those commands are:

Working with Cluster Shared Volumes:

Get-ClusterSharedVolume [\[-Name] <vname>] [-Cluster <cname>]

Add-ClusterSharedVolume [\[-Name] <vname>] [-Cluster <cname>]

Move-ClusterSharedVolume [\[-Name] <vname>] [\[-Node] <nname>] [-Cluster <cname>] [-Wait <seconds>]

Remove-ClusterSharedVolume [\[-Name] <vname>] [-Cluster <cname>]

Repair-ClusterSharedVolume -ChkDsk [-VolumeName] <vname> [-Parameters <pname>]

Repair-ClusterSharedVolume -Defrag [-VolumeName] <vname> [-Parameters <pname>]

 

Working with Virtual Machines:

Add-ClusterVirtualMachineRole -VirtualMachine <vmname> [\[-Name] <nname>] [-Cluster <cname>]

Move-ClusterVirtualMachineRole [\[-Name] <vmname>] [\[-Node] <nname>] [-Cancel] [-Cluster <cname>] [-Wait <seconds>]

Update-ClusterVirtualMachineConfiguration [\[-Name] <vmname>] [-Cluster <cname>]

 

Working with Disks:

Get-ClusterAvailableDisk [-Cluster <cname>]

Add-ClusterDisk [-InputObject] <ClusterDiskInfo\[]>

 

Working with Failover Cluster Validation:

Test-Cluster [\[-Node] <nnames>] [-Cluster <cname>] [-Ignore <tests>] [-Include <tests>] [-List] [-ReportName <reportname>]

Catch up with @ConcentratdGreg on Twitter!

Related Content:

ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.