A blog by Jose Barreto, a member of the File Server team at Microsoft.
All messages posted to this blog are provided "AS IS" with no warranties, and confer no rights.
Information on unreleased products are subject to change without notice.
Dates related to unreleased products are estimates and are subject to change without notice.
The content of this site are personal opinions and might not represent the Microsoft Corporation view.
The information contained in this blog represents my view on the issues discussed as of the date of publication.
You should not consider older, out-of-date posts to reflect my current thoughts and opinions.
© Copyright 2004-2012 by Jose Barreto. All rights reserved.
Follow @josebarreto on Twitter for updates on new blog posts.
While many of the Windows Server Failover Cluster (WSFC) administrators have moved from the old CLUSTER.EXE command-line to the new PowerShell interface, I know at least a few holdouts out there. It’s probably the fact that they have used the old CLI since the early days of Microsoft Cluster Services (MSCS), combined with the fact that CLUSTER.EXE was not actually removed in Windows Server 2008 or even in Windows Server 2008 R2.
To help with the transition, the Cluster team has published a guide that helps you with “Mapping Cluster.exe Commands to Windows PowerShell Cmdlets for Failover Clusters” at http://technet.microsoft.com/en-us/library/ee619744.aspx. However, while looking into PowerShell management for a project, I noticed a more detailed mapping could be helpful. Please find in the table below my “Extended Edition” of the mapping of the CLUSTER.EXE commands (including parameters) to PowerShell cmdlets, as they exist in Windows Server 2008 R2. I also added below a basic class diagram showing the main entities, attributes and methods involved. Below the table, you can also find a list of new PowerShell cmdlets that have no equivalent in the old CLUSTER.EXE.
CLUSTER.EXE COMMAND
POWERSHELL CMDLET
CLUSTER /HELP
Import-Module FailoverClusters Get-Command –Module FailoverClusters Get-Help <clustercmdlet> [-examples] [-detailed] [-full]
CLUSTER /LIST[:domain-name]
Get-Cluster [-Domain <domainname>] Get-Cluster [[-Name] <cname>]
CLUSTER [/CLUSTER:cname] /CREATE [/NODE[S]:"nname[ nname ...]"] /IPADDR[ESS]:<ip-list>
New-Cluster [-Name] < cname > [-IgnoreNetwork <netname>] [-Node <nname>] [-NoStorage] [-StaticAddress <address>]
CLUSTER [/CLUSTER:cname] /ADD[NODE] [/NODE[S]:"nname[ nname ...]"]
Add-ClusterNode [[-Name] <cname>] [-Cluster <cname>]
CLUSTER [/CLUSTER:cname] /DESTROY [/Y] [/CLEANUP[ACTIVEDIRECTORY]]
Remove-Cluster [-CleanupAD] [-Cluster <cname>] [-Force]
CLUSTER [/CLUSTER:cname] /SHUTDOWN [/Y]
Stop-Cluster [[-Name] <cname>] [-Force] Start-Cluster [[-Name] <cname>] [-Wait <seconds>]
CLUSTER [/CLUSTER:cname] /PROP[ERTIES] [<plist>]
Get-Cluster [[-Name] <cname>] | Select * (Get-Cluster [[-Name] <cname>]).<pname>=<value>
CLUSTER [/CLUSTER:cname] /PRIV[PROPERTIES] [<plist>]
Get-Cluster [[-Name] <cname>] | Get-ClusterParameter [[-Name] <pname>] Get-Cluster [[-Name] <cname>] | Set-ClusterParameter [[-Name] <pname>] [[-Value] <valuet>] [-Create] [-Delete]
CLUSTER [/CLUSTER:cname] /REN[AME]:newname
(Get-Cluster [-Name] “cname”).Name = ”<newname>”
CLUSTER [/CLUSTER:cname] /QUORUM
Get-ClusterQuorum [-Cluster <cname>]
CLUSTER [/CLUSTER:cname] /QUORUM /NODE[MAJORITY] CLUSTER [/CLUSTER:cname] /QUORUM:rname [/PATH:path] [/DISK[ONLY]]
Set-ClusterQuorum [-Cluster <cname>] [-DiskOnly <disk>] [-NodeAndDiskMajority <disk>] [-NodeAndFileShareMajority <path>] [-NodeMajority]
CLUSTER [/CLUSTER:cname] /LISTNETPRI[ORITY]
Get-ClusterNetwork | Select Name, Metric | Sort Metric –Desc
CLUSTER [/CLUSTER:cname] /[LIST]SHARE[S] [:<netname>]
Get-WmiObject [–ComputerName <name>] Win32_ClusterShare
CLUSTER [/CLUSTER:cname] /VER[SION]
Get-Process ClusSvc | Select Product, FileVersion, ProductVersion
CLUSTER [/CLUSTER:cname] NODE [nname] [/STAT[US]]
Get-ClusterNode [[-Name] <nname>] [-Cluster <cname>]
CLUSTER [/CLUSTER:cname] NODE [nname] /FORCE[CLEANUP] [/WAIT[:seconds]]
Clear-ClusterNode [[-Name] <nname>] [-Cluster <cname>] [-Force] [-Wait <seconds>]
CLUSTER [/CLUSTER:cname] NODE [nname] /START [/WAIT[:seconds]]
Start-ClusterNode [[-Name] <nname>] [-Cluster <cname>] [-FixQuorum] [-Wait <seconds>]
CLUSTER [/CLUSTER:cname] NODE [nname] /STOP [/WAIT[:seconds]]
Stop-ClusterNode [[-Name] <nname>] [-Cluster <cname>] [-Wait <seconds>]
CLUSTER [/CLUSTER:cname] NODE [nname] /PROP[ERTIES] [<plist>]
Get-ClusterNode [[-Name] <nname>] |Select * (Get-ClusterNode [[-Name] <nname>]).<pname>=<value>
CLUSTER [/CLUSTER:cname] NODE [nname] /PRIV[PROPERTIES] [<plist>]
Get-ClusterNode [[-Name] <nname>] | Get-ClusterParameter [[-Name] <pname>] Get-ClusterNode [[-Name] <nname>] | Set-ClusterParameter [[-Name] <pname>] [[-Value] <value>] [-Create] [-Delete]
CLUSTER [/CLUSTER:cname] NODE [nname] /PAUSE
Suspend-ClusterNode [[-Name] <nname>] [-Cluster <cname>]
CLUSTER [/CLUSTER:cname] NODE [nname] /RESUME
Resume-ClusterNode [[-Name] <nname>] [-Cluster <cname>]
CLUSTER [/CLUSTER:cname] NODE [nname] /EVICT [/WAIT[:seconds]]
Remove-ClusterNode [[-Name] <nname>] [-Cluster <cname>] [-Force] [-Wait <seconds>]
CLUSTER [/CLUSTER:cname] NODE nname /LISTINT[ERFACES]
Get-ClusterNetworkInterface –Node <nname>
CLUSTER [/CLUSTER:cname] NODE [nname] /CLEAR[PR]:device-number
Clear-ClusterDiskReservation -Disk <device-number> [[-Node] <nname>] [-Force]
CLUSTER [/CLUSTER:cname] GROUP [gname] [/STAT[US]]
Get-ClusterGroup [[-Name] <gname>] [-Cluster <cname>]
CLUSTER [/CLUSTER:cname] GROUP [gname] /NODE:nname
Get-ClusterGroup [[-Name] <gname>] | ? { $_.OwnerNode –eq ”nname” }
CLUSTER [/CLUSTER:cname] GROUP[gname] /PROP[ERTIES] [<plist>]
Get-ClusterGroup [[-Name] <gname>] | Select *
CLUSTER [/CLUSTER:cname] GROUP [gname] /PRIV[PROPERTIES] [<plist>]
Get-ClusterGroup [[-Name] <gname>] | Get-ClusterParameter [[-Name] <pname>] Get-ClusterGroup [[-Name] <gname>] | Set-ClusterParameter [[-Name] <pname>] [[-Value] <value>] [-Create] [-Delete]
CLUSTER [/CLUSTER:cname] GROUP gname /CREATE
Add-ClusterGroup [-Name] <gname> [-Cluster <cname>] Add-ClusterFileServerRole [[-Name] <gname>] [-Cluster <cname>] [-IgnoreNetwork <netname>] [-StaticAddress <address>] [-Storage <storage>] [-Wait <seconds>] Add-ClusterGenericApplicationRole -CommandLine <cmdline> [[-Name] <gname>] [-CheckpointKey <cpkey>] [-Cluster <cname>] [-IgnoreNetwork <netname>] [-Parameters <param>] [-StaticAddress <address>] [-Storage <storage>] [-Wait <seconds>] Add-ClusterGenericScriptRole -ScriptFilePath <path> [[-Name] <gname>] [-Cluster <cname>] [-IgnoreNetwork <netname>] [-StaticAddress <address>] [-Storage <storage>] [-Wait <seconds>] Add-ClusterGenericServiceRole -ServiceName <service> [[-Name] <gname>] [-CheckpointKey <key>] [-Cluster <cname>] [-IgnoreNetwork <netname>] [-StaticAddress <address>] [-Storage <storage>] [-Wait <seconds>] Add-ClusterPrintServerRole [[-Name] <gname>] [-Cluster <cname>] [-IgnoreNetwork <netname>] [-StaticAddress <address>] [-Storage <storage>] [-Wait <seconds>] Add-ClusterServerRole [[-Name] <gname>] [-Cluster <cname>] [-IgnoreNetwork <netname>] [-StaticAddress <address>] [-Storage <storage>] [-Wait <seconds>]
CLUSTER [/CLUSTER:cname] GROUP gname /DELETE
Remove-ClusterGroup [[-Name] <gname>] [-Cluster <cname>] [-Force] [-RemoveResources]
CLUSTER [/CLUSTER:cname] GROUP gname /REN[AME]:newname
(Get-ClusterGroup [-Name] <gname>).Name =”<newname>”
CLUSTER [/CLUSTER:cname] GROUP gname /MOVE[TO] [:nname] [/WAIT[:seconds]]
Move-ClusterGroup [[-Name] <gname>] [[-Node] <nname>] [-Cluster <cname>] [-Wait <seconds>]
CLUSTER [/CLUSTER:cname] GROUP gname /ON[LINE] [:nname] [/WAIT[:seconds]]
Start-ClusterGroup [[-Name] <gname>] [-Cluster <cname>] [-Wait <seconds>]
CLUSTER [/CLUSTER:cname] GROUP gname /OFF[LINE] [/WAIT[:seconds]]
Stop-ClusterGroup [[-Name] <gname>] [-Cluster <cname>] [-Wait <seconds>]
CLUSTER [/CLUSTER:cname] GROUP gname /LISTOWNERS
Get-ClusterOwnerNode [-Cluster <cname>] [-Group <gname>] [-ResourceType <tname>]
CLUSTER [/CLUSTER:cname] GROUP gname /SETOWNERS:nname[,nname ...] CLUSTER [/CLUSTER:cname] GROUP gname /CLEAROWNERS
Set-ClusterOwnerNode -Owners <nname> [-Cluster <cname>] [-Group <gname>]
CLUSTER [/CLUSTER:cname] RES[OURCE] [rname] [/STAT[US]]
Get-ClusterResource [[-Name] <rname>] [-Cluster <cname>]
CLUSTER [/CLUSTER:cname] RES[OURCE] /NODE:nname
Get-ClusterResource [[-Name] <rname>] | ? { $_.OwnerNode –eq ”nname” }
CLUSTER [/CLUSTER:cname] RES[OURCE] rname /PROP[ERTIES] [<plist>]
Get-ClusterResource [[-Name] <rname>] | Select *
CLUSTER [/CLUSTER:cname] RES[OURCE] rname /PRIV[PROPERTIES] [<plist>]
Get-ClusterResource [[-Name] <rname>] | Get-ClusterParameter [[-Name] <pname>] Get-ClusterResource [[-Name] <rname>] | Set-ClusterParameter [[-Name] <pname>] [[-Value] <value>] [-Cluster <cname>] [-Create] [-Delete]
CLUSTER [/CLUSTER:cname] RES[OURCE] rname /CREATE /GROUP:gname /TYPE:tname [/SEPARATE]
Add-ClusterResource [-Name] <rname> [-ResourceType] <tname> [[-Group] <gname>] [-Cluster <cname>]
CLUSTER [/CLUSTER:cname] RES[OURCE] rname /DELETE
Remove-ClusterResource [[-Name] <rname>] [-Cluster <cname>] [-Force]
CLUSTER [/CLUSTER:cname] RES[OURCE] rname /REN[AME]:newname
(Get-ClusterResource [-Name] <rname> ).Name=”<newname>”
CLUSTER [/CLUSTER:cname] RES[OURCE] rname /ADDOWNER:nname CLUSTER [/CLUSTER:cname] RES[OURCE] rname /REMOVEOWNER:nname
Set-ClusterOwnerNode -Owners <nname> [-Cluster <cname>] [-Group <gname>] [-Resource <rname>]
CLUSTER [/CLUSTER:cname] RES[OURCE] rname /LISTOWNERS
Get-ClusterOwnerNode [-Cluster <cname>] [-Group <gname>] [-Resource <rname>] [-ResourceType <tname>]
CLUSTER [/CLUSTER:cname] RES[OURCE] rname /MOVE[TO]:gname
Move-ClusterResource [[-Name] <rname>] [[-Group] <gname>] [-Cluster <cname>]
CLUSTER [/CLUSTER:cname] RES[OURCE] rname /FAIL
Test-ClusterResourceFailure [[-Name] <rname>] [-Cluster <cname>]
CLUSTER [/CLUSTER:cname] RES[OURCE] rname /ON[LINE] [/WAIT[:seconds]]
Start-ClusterResource [[-Name] <rname>] [-Cluster <cname>] [-Wait <seconds>]
CLUSTER [/CLUSTER:cname] RES[OURCE] rname /OFF[LINE] [/WAIT[:seconds]]
Stop-ClusterResource [[-Name] <rname>] [-Cluster <cname>] [-Wait <seconds>]
CLUSTER [/CLUSTER:cname] RES[OURCE] rname /LISTDEP[ENDENCIES]
Get-ClusterResourceDependency [[-Resource] <rname>] [-Cluster <cname>] [-Guid] Get-ClusterResourceDependencyReport [-Cluster <cname>] [-Group <gname>] [-Resource <rname>]
CLUSTER [/CLUSTER:cname] RES[OURCE] rname /ADDDEP[ENDENCY]:rname
Add-ClusterResourceDependency [[-Resource] <rname>] [[-Provider] <provider>] [-Cluster <cname>]
CLUSTER [/CLUSTER:cname] RES[OURCE] rname /SETDEP[ENDENCIES]:<dependency-string>
Set-ClusterResourceDependency [[-Resource] <rname>] [[-Dependency] <dependency>] [-Cluster <cname>]
CLUSTER [/CLUSTER:cname] RES[OURCE] rname /REMOVEDEP[ENDENCY]:rname
Remove-ClusterResourceDependency [[-Resource] <rname>] [[-Provider] <provider>] [-Cluster <cname>]
CLUSTER [/CLUSTER:cname] RES[OURCE] rname /MAINT[ENANCEMODE] [:<settings>]
Suspend-ClusterResource [[-Name] <rname>] [-Cluster <cname>] [-Force] [-RedirectedAccess] [-VolumeName <volume>] Resume-ClusterResource [[-Name] <rname>] [-Cluster <cname>] [-VolumeName <volume>]
CLUSTER [/CLUSTER:cname] RES[OURCE] rname /REL[EASE[ADDRESS]]
Update-ClusterIPResource [[-Name] <rname>] [-Cluster <cname>] –Release
CLUSTER [/CLUSTER:cname] RES[OURCE] rname /RENEW[ADDRESS]
Update-ClusterIPResource [[-Name] <rname>] [-Cluster <cname>] –Renew
CLUSTER [/CLUSTER:cname] RES[OURCE] [rname] /CHECK[POINTS]
Get-WmiObject MSCluster_Resource –NameSpace Root/MSCluster –Filter “Name=’rname’ ” | Select Name, RegistryCheckpoints
CLUSTER [/CLUSTER:cname] RES[OURCE] rname /ADDCHECK[POINTS]:key[\subkey...] [,key[\subkey...]...]
(Get-WmiObject MSCluster_Resource –NameSpace Root/MSCluster –Filter “Name=’rname’ ”).AddRegistryCheckpoint(“type\name\key”)
CLUSTER [/CLUSTER:cname] RES[OURCE] rname /REMOVECHECK[POINTS]:key[\subkey...] [,key[\subkey...]...]
(Get-WmiObject MSCluster_Resource –NameSpace Root/MSCluster –Filter “Name=’rname’ ”).RemoveRegistryCheckpoint(“type\name\key”)
CLUSTER [/CLUSTER:cname] RES[OURCE] [rname] /CRYPTOCHECK[POINTS]
Get-WmiObject MSCluster_Resource –NameSpace Root/MSCluster –Filter “Name=’rname’ ” | Select Name, CryptoCheckpoints
CLUSTER [/CLUSTER:cname] RES[OURCE] rname /ADDCRYPTOCHECK[POINTS]:type\name\key[,type\name\key...]
CLUSTER [/CLUSTER:cname] RES[OURCE] rname /REMOVECRYPTOCHECK[POINTS]:type\name\key[,type\name\key...]
CLUSTER [/CLUSTER:cname] RES[OURCE]TYPE [/LIST]
Get-ClusterResourceType [[-Name] <tname>] [-Cluster <cname>]
CLUSTER [/CLUSTER:cname] RES[OURCE]TYPE [{displayname|tname}] /LISTOWNERS [/TYPE]
Get-ClusterResourceType | Get-ClusterOwnerNode
CLUSTER [/CLUSTER:cname] RES[OURCE]TYPE {displayname|tname} /PROP[ERTIES] [<plist>]
Get-ClusterResourceType [[-Name] <tname>] |Select *
CLUSTER [/CLUSTER:cname] RES[OURCE]TYPE {displayname|tname} /PRIV[PROPERTIES] [<plist>]
Get-ClusterResourceType [[-Name] <tname>] | Get-ClusterParameter [[-Name] <pname>] Get-ClusterResourceType [[-Name] <tname>] | Set-ClusterParameter [[-Name] <pname>] [[-Value] <value>] [-Create] [-Delete]
CLUSTER [/CLUSTER:cname] RES[OURCE]TYPE displayname /CREATE /DLL[NAME]:dllname [/TYPE:tname] [/ISALIVE:interval-millisec] [/LOOKSALIVE:interval-millisec]
Add-ClusterResourceType [-Name] <tname> [-Dll] <dllname> [[-DisplayName] <dname>] [-Cluster <cname>]
CLUSTER [/CLUSTER:cname] RES[OURCE]TYPE {{displayname|tname} /DELETE
Remove-ClusterResourceType [[-Name] <tname>] [-Cluster <cname>]
CLUSTER [/CLUSTER:cname] RES[OURCE]TYPE tname /DELETE /TYPE
CLUSTER [/CLUSTER:cname] NET[WORK] [netname] [/STAT[US]]
Get-ClusterNetwork [[-Name] <netname>] [-Cluster <cname>]
CLUSTER [/CLUSTER:cname] NET[WORK] [netname] /PROP[ERTIES] [<plist>]
Get-ClusterNetwork [[-Name] <netname>] | Select *
CLUSTER [/CLUSTER:cname] NET[WORK] [netname] /PRIV[PROPERTIES] [<plist>]
Get-ClusterNetwork [[-Name] <netname>] | Get-ClusterParameter [[-Name] <pname>] Get-ClusterNetwork [[-Name] <netname>] | Set-ClusterParameter [[-Name] <pname>] [[-Value] <value>] [-Create] [-Delete]
CLUSTER [/CLUSTER:cname] NET[WORK] netname /REN[AME]:newname
(Get-ClusterNetwork [-Name] <netname>).Name=”<newname>”
CLUSTER [/CLUSTER:cname] NET[WORK] netname /LISTINT[ERFACES]
Get-ClusterNetworkInterface [[-Name] <iname>] [-Cluster <cname>] [-Network <netname>] [-Node <nname>]
CLUSTER [/CLUSTER:cname] NETINT[ERFACE] [[/NODE:]nname [/NET[WORK]:]netname] [/STAT[US]]
CLUSTER [/CLUSTER:cname] NETINT[ERFACE] [/NODE:]nname [/NET[WORK]:]netname /PROP[ERTIES] [<plist>]
Get-ClusterNetworkInterface [[-Name] <iname>] |Select *
CLUSTER [/CLUSTER:cname] NETINT[ERFACE] [/NODE:]nname [/NET[WORK]:]netname /PRIV[PROPERTIES] [<plist>]
Get-ClusterNetworkInterface [[-Name] <iname>] | Get-ClusterParameter [[-Name] <pname>]
CLUSTER LOG /G[EN[ERATE]] [/COPY[:"directory"]] [/NODE:"nname"] [/SPAN[MIN[UTE[S]]]:min] ]
Get-ClusterLog [[-Node] <nname>] [-Cluster <cname>] [-Destination <path>] [-TimeSpan <UInt32>]
CLUSTER LOG /SIZE:logsize-MB CLUSTER LOG /LEVEL:logLevel
Set-ClusterLog [-Cluster <cname>] [-Level <int>] [-Size <int>]
CLUSTER [/CLUSTER:cname] /PROP[ERTIES] “SECURITY DESCRIPTOR”=<domain>\<username>,GRANT,{F|C|R}:SECURITY
Grant-ClusterAccess [-User] <uname> [-Cluster <cname>] [-Full] [-ReadOnly]
CLUSTER [/CLUSTER:cname] /PROP[ERTIES] “SECURITY DESCRIPTOR”= <domain>\<username>,REVOKE:SECURITY
Remove-ClusterAccess [[-User] <uname>] [-Cluster <cname>]
CLUSTER [/CLUSTER:cname] /PROP[ERTIES] “SECURITY DESCRIPTOR”=<domain>\<username>,DENY,{F|C|R}:SECURITY
Block-ClusterAccess [-User] <uname> [-Cluster <cname>]
CLUSTER [/CLUSTER:cname] /PROP[ERTIES] “SECURITY DESCRIPTOR”= <domain>\<username>,SET,{F|C|R}:SECURITY
Remove-ClusterAccess [[-User] <uname>] [-Cluster <cname>] Grant-ClusterAccess [-User] <uname> [-Cluster <cname>] [-Full] [-ReadOnly]
CLUSTER [/CLUSTER:cname] /PROP[ERTIES] “SECURITY DESCRIPTOR”
Get-ClusterAccess [[-User] <uname>] [-Cluster <cname>]
There are some PowerShell CmdLets which implement functionality not available via the old CLUSTER.EXE:
Cmdlets related to Cluster Shared Volumes:
CmdLets related to Virtual Machines:
CmdLets related to disks:
Cmdlet to run Failover Cluster Validation:
Hi,
It seems there is some problem with get-clusterlog, is it a bug?
social.technet.microsoft.com/.../d25d01ab-0280-4fc4-82c1-ec6981467335
Historiquement pour ceux qui voulaient gérer leur clusters en ligne de commande, il y avait le fameux
Inizio con un ammissione : abituato ad usare la command-line Cluster.exe, faccio fatica a sostituirla
When I configure MSMQ for failover using the UI, the cluster group in the UI shows a type of "MSMQ" and the UI gives me the option to manage MSMQ.
When I create a cluster group using powershell and create the MSMQ resource, I get the behaviour I want except the type shows up as "other" and I don't see the option to manage MSMQ.
I was digging around both the cluster.exe and the Powershell module and could not find a thing that allows me to change this.
Do you have more insight into this?
In Windows Server 2008 R2 the Failover Clustering feature contains a Windows PowerShell-module for administering