This script uses the cmdlet Get-Cluster to get all cluster resources and their dependencies
Command :
Get-Cluster -Name ClusterName | Get-ClusterResource | Get-ClusterResourceDependency
References
Syntax
Get-Cluster [-Domain] [ ]
- Domain
Get-Cluster [[-Name]] [ ]
- Name
Detailed Description
This cmdlet can obtain a variety of configuration and state information about a failover cluster, including the following items:
– State information about whether a backup is in progress.
– State information about whether the cluster is in a forced quorum state.
– Cross-network settings that are especially relevant for multi-site clusters.
To set a common property for the cluster, use this cmdlet to get the cluster object and then set the appropriate property on that cluster object directly.
Parameters
Domain
Specifies the name of the domain to enumerate clusters in.
Default Value:
Data Type: string
Attributes
Name | Value | PSMAML Attribute |
---|---|---|
Required? | false | required |
Variable Length? | false | variableLength |
Accept wildcard characters? | false | globbing |
Accept Pipeline Input? | false | pipelineInput |
Position? | named | position |
Value Attributes
Name | Value | PSMAML Attribute |
---|---|---|
Required? | true | required |
Variable Length? | false | variableLength |
Name
Specifies the name of the cluster to get.
Default Value:
Data Type: string
Attributes
Name | Value | PSMAML Attribute |
---|---|---|
Required? | false | required |
Variable Length? | false | variableLength |
Accept wildcard characters? | false | globbing |
Accept Pipeline Input? | false | pipelineInput |
Position? | 1 | position |
Value Attributes
Name | Value | PSMAML Attribute |
---|---|---|
Required? | true | required |
Variable Length? | false | variableLength |
Examples
————————– EXAMPLE 1 ————————–
Get-Cluster | fl * Domain : contoso.com Name : cluster1 FixQuorum : 0 SharedVolumesRoot : C:\ClusterStorage DefaultNetworkRole : 2 Description : QuorumArbitrationTimeMax : 20 ClusSvcHangTimeout : 60 ClusSvcRegroupStageTimeout : 7 ClusSvcRegroupOpeningTimeout : 5 ClusSvcRegroupPruningTimeout : 5 ClusSvcRegroupTickInMilliseconds : 300 HangRecoveryAction : 3 SameSubnetDelay : 1000 CrossSubnetDelay : 1000 SameSubnetThreshold : 5 PlumbAllCrossSubnetRoutes : 0 CrossSubnetThreshold : 5 BackupInProgress : 0 RequestReplyTimeout : 60 WitnessRestartInterval : 15 SecurityLevel : 1 ClusterLogLevel : 3 ClusterLogSize : 100 WitnessDatabaseWriteTimeout : 300 AddEvictDelay : 60 EnableSharedVolumes : Enabled Id : 655d3640-2845-4077-a396-9f317f2df60e
Description
———–
This command displays state and property information for the local cluster in the form of a list.
————————– EXAMPLE 2 ————————–
Get-Cluster cluster1 Name ---- cluster1
Description
———–
This command gets information about a cluster named cluster1.
————————– EXAMPLE 3 ————————–
Get-Cluster -domain contoso.com Name ---- cluster1 cluster2 cluster3
Description
———–
This command gets information about each of the clusters in the contoso.com domain.
————————– EXAMPLE 4 ————————–
$cluster = Get-Cluster; $cluster.CrossSubnetDelay = 1500
Description
———–
This command sets the common property CrossSubnetDelay for the local cluster to 1500. Alternatively, you can run “Get-Cluster | %{ $_.CrossSubnetDelay = 1500 }” to set that property.