Condividi tramite


Mapping Cluster.exe Commands to Windows PowerShell Cmdlets for Failover Clusters

Updated: October 1, 2009

Applies To: Windows Server 2008 R2

This topic maps Cluster.exe commands to Windows PowerShell cmdlets and commands for failover clusters running Windows Server® 2008 R2. Although Cluster.exe is included in Windows Server 2008 R2, Microsoft's intention is to deprecate it in favor of Windows PowerShell. Therefore, we recommend that customers who want to use a command-line interface for failover clustering learn about Windows PowerShell, and change scripts over to use Windows PowerShell.

For information about using Windows PowerShell, see Additional references, later in this topic.

This topic contains sections that cover the following commands:

  • Cluster commands and equivalent Windows PowerShell cmdlets

  • Cluster node commands and equivalent Windows PowerShell cmdlets

  • Cluster group commands and equivalent Windows PowerShell cmdlets

  • Cluster resource commands and equivalent Windows PowerShell cmdlets

  • Cluster network commands, cluster netinterface commands, and equivalent Windows PowerShell cmdlets

  • Cluster resourcetype commands and equivalent Windows PowerShell cmdlets

Cluster commands and equivalent Windows PowerShell cmdlets

Back to top

In the following table, each cluster command is mapped to the Windows PowerShell equivalent.

Command PowerShell command equivalent

cluster /prop

Get-Cluster | fl *

For more information, see: Get-Cluster (https://go.microsoft.com/fwlink/?LinkId=143782)

cluster /create

New-Cluster

For more information, see: New-Cluster (https://go.microsoft.com/fwlink/?LinkId=143803)

cluster /destroy

Remove-Cluster

For more information, see: Remove-Cluster (https://go.microsoft.com/fwlink/?LinkId=143804)

cluster /add

Add-ClusterNode

For more information, see: Add-ClusterNode (https://go.microsoft.com/fwlink/?LinkId=143771)

cluster /shutdown

Stop-Cluster

For more information, see: Stop-Cluster (https://go.microsoft.com/fwlink/?LinkId=143824)

cluster /rename

(Get-Cluster).Name = "newname"

For more information, see: Get-Cluster (https://go.microsoft.com/fwlink/?LinkId=143782)

cluster /quorum

Get-ClusterQuorum

Set-ClusterQuorum

For more information, see:

Cluster node commands and equivalent Windows PowerShell cmdlets

Back to top

In the following table, each cluster node command is mapped to the Windows PowerShell equivalent.

Command PowerShell command equivalent

cluster node /status

Get-ClusterNode

For more information, see: Get-ClusterNode (https://go.microsoft.com/fwlink/?LinkId=143789)

cluster node /prop

Get-ClusterNode | fl *

For more information, see: Get-ClusterNode (https://go.microsoft.com/fwlink/?LinkId=143789)

cluster node /pause

Suspend-ClusterNode

For more information, see: Suspend-ClusterNode (https://go.microsoft.com/fwlink/?LinkId=143828)

cluster node /resume

Resume-ClusterNode

For more information, see: Resume-ClusterNode (https://go.microsoft.com/fwlink/?LinkId=143813)

cluster node /start

Start-ClusterNode

For more information, see: Start-ClusterNode (https://go.microsoft.com/fwlink/?LinkId=143822)

(For the net start clussvc /forcequorum command, the PowerShell equivalent is Start-ClusterNode with the -FixQuorum option.)

cluster node /stop

Stop-ClusterNode

For more information, see: Stop-ClusterNode (https://go.microsoft.com/fwlink/?LinkId=143826)

cluster node /evict

Remove-ClusterNode

For more information, see: Remove-ClusterNode (https://go.microsoft.com/fwlink/?LinkId=143807)

cluster node /forcecleanup

Clear-ClusterNode

For more information, see: Clear-ClusterNode (https://go.microsoft.com/fwlink/?LinkId=143781)

Cluster group commands and equivalent Windows PowerShell cmdlets

Back to top

In the following table, each cluster group command is mapped to the Windows PowerShell equivalent.

Command PowerShell command equivalent

cluster group

Get-ClusterGroup

For more information, see: Get-ClusterGroup (https://go.microsoft.com/fwlink/?LinkId=143785)

cluster group /prop

Get-ClusterGroup | fl *

For more information, see: Get-ClusterGroup (https://go.microsoft.com/fwlink/?LinkId=143785)

cluster group <groupname> /create

Choose from:

  • Add-ClusterGroup

  • Add-ClusterFileServerRole

  • Add-ClusterPrintServerRole

  • Add-ClusterVirtualMachineRole

For more information, see:

cluster group <groupname> /delete

Remove-ClusterGroup <groupname>

For more information, see: Remove-ClusterGroup (https://go.microsoft.com/fwlink/?LinkId=143806)

cluster group <groupname> /online

Start-ClusterGroup <groupname>

For more information, see: Start-ClusterGroup (https://go.microsoft.com/fwlink/?LinkId=143821)

cluster group <groupname> /offline

Stop-ClusterGroup <groupname>

For more information, see: Stop-ClusterGroup (https://go.microsoft.com/fwlink/?LinkId=143825)

cluster group <groupname> /move

Move-ClusterGroup <groupname>

For more information, see: Move-ClusterGroup (https://go.microsoft.com/fwlink/?LinkId=143799)

cluster group "Available Storage" /move

Move-ClusterGroup "Available Storage"

For more information, see: Move-ClusterGroup (https://go.microsoft.com/fwlink/?LinkId=143799)

Cluster resource commands and equivalent Windows PowerShell cmdlets

Back to top

In the following table, each cluster resource command is mapped to the Windows PowerShell equivalent.

Command PowerShell command equivalent

cluster resource

Get-ClusterResource

For more information, see: Get-ClusterResource (https://go.microsoft.com/fwlink/?LinkId=143793)

cluster resource /prop

Get-ClusterResource | fl *

For more information, see: Get-ClusterResource (https://go.microsoft.com/fwlink/?LinkId=143793)

cluster resource "<resourcename>" /prop <property>=<value>

$resource = Get-ClusterResource "<resourcename>"; $resource.<property> = <value>

For more information, see: Get-ClusterResource (https://go.microsoft.com/fwlink/?LinkId=143793)

cluster resource /priv

Get-ClusterResource | Get-ClusterParameter

For more information, see: Get-ClusterResource (https://go.microsoft.com/fwlink/?LinkId=143793)

Get-ClusterParameter (https://go.microsoft.com/fwlink/?LinkId=143791)

cluster resource <resourcename> /create /group:<groupname> /type:<restype>

Add-ClusterResource

For more information, see: Add-ClusterResource (https://go.microsoft.com/fwlink/?LinkId=143773)

cluster resource "<resourcename>" /delete

Remove-ClusterResource "<resourcename>"

For more information, see: Remove-ClusterResource (https://go.microsoft.com/fwlink/?LinkId=143808)s

cluster resource "<resourcename>" /online

Start-ClusterResource "<resourcename>"

For more information, see: Start-ClusterResource (https://go.microsoft.com/fwlink/?LinkId=143823)

cluster resource "<resourcename>" /offline

Stop-ClusterResource "<resourcename>"

For more information, see: Stop-ClusterResource (https://go.microsoft.com/fwlink/?LinkId=143827)

cluster resource "<diskresourcename>" /maint:on

Suspend-ClusterResource "<diskresourcename>"

For more information, see: Suspend-ClusterResource (https://go.microsoft.com/fwlink/?LinkId=143829)s

cluster resource "<diskresourcename>" /maint:off

Resume-ClusterResource "<diskresourcename>"

For more information, see: Resume-ClusterResource (https://go.microsoft.com/fwlink/?LinkId=143814)

Cluster network commands, cluster netinterface commands, and equivalent Windows PowerShell cmdlets

Back to top

In the following table, each cluster network or cluster netinterface command is mapped to the Windows PowerShell equivalent.

Command PowerShell command equivalent

cluster network

Get-ClusterNetwork

For more information, see: Get-ClusterNetwork (https://go.microsoft.com/fwlink/?LinkId=143787)

cluster network /prop

Get-ClusterNetwork | fl *

For more information, see: Get-ClusterNetwork (https://go.microsoft.com/fwlink/?LinkId=143787)

cluster netinterface

Get-ClusterNetworkInterface

For more information, see: Get-ClusterNetworkInterface (https://go.microsoft.com/fwlink/?LinkId=143788)

cluster netinterface /prop

Get-ClusterNetworkInterface | fl *

For more information, see: Get-ClusterNetworkInterface (https://go.microsoft.com/fwlink/?LinkId=143788)

Cluster resourcetype commands and equivalent Windows PowerShell cmdlets

Back to top

In the following table, each cluster resourcetype command is mapped to the Windows PowerShell equivalent.

Command PowerShell command equivalent

cluster resourcetype

Get-ClusterResourceType

For more information, see: Get-ClusterResourceType (https://go.microsoft.com/fwlink/?LinkId=143796)

cluster resourcetype /prop

Get-ClusterResourceType | fl *

For more information, see: Get-ClusterResourceType (https://go.microsoft.com/fwlink/?LinkId=143796)

cluster resourcetype /priv

Get-ClusterResourceType | Get-ClusterParameter

For more information, see: Get-ClusterResourceType (https://go.microsoft.com/fwlink/?LinkId=143796)

Get-ClusterParameter (https://go.microsoft.com/fwlink/?LinkId=143791)

Additional references