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

Greg Shields

October 29, 2010

1 Min Read
ITPro Today logo in a gray background | ITPro Today

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\] \] \[-Cluster \]

Add-ClusterSharedVolume \[\[-Name\] \] \[-Cluster \]

Move-ClusterSharedVolume \[\[-Name\] \] \[\[-Node\] \] \[-Cluster \] \[-Wait \]

Remove-ClusterSharedVolume \[\[-Name\] \] \[-Cluster \]

Repair-ClusterSharedVolume -ChkDsk \[-VolumeName\] \[-Parameters \]

Repair-ClusterSharedVolume -Defrag \[-VolumeName\] \[-Parameters \]

 

Working with Virtual Machines:

Add-ClusterVirtualMachineRole -VirtualMachine \[\[-Name\] \] \[-Cluster \]

Move-ClusterVirtualMachineRole \[\[-Name\] \] \[\[-Node\] \] \[-Cancel\] \[-Cluster \] \[-Wait \]

Update-ClusterVirtualMachineConfiguration \[\[-Name\] \] \[-Cluster \]

 

Working with Disks:

Get-ClusterAvailableDisk \[-Cluster \]

Add-ClusterDisk \[-InputObject\]

 

Working with Failover Cluster Validation:

Test-Cluster \[\[-Node\] \] \[-Cluster \] \[-Ignore \] \[-Include \] \[-List\] \[-ReportName \]

Catch up with @ConcentratdGreg on Twitter!

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like