Find-SCCluster
Finds the specified failover cluster in a VMM environment.
Syntax
UserCredentials (Default)
Find-SCCluster
[-ComputerName] <String>
-Credential <VMMCredential>
[-VMMServer <ServerConnection>]
[-EnumerateFileServers <Boolean>]
[-NonTrustedDomainHost]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
ServerCredentials
Find-SCCluster
-LibraryServer <LibraryServer>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Description
The Find-SCCluster cmdlet queries Virtual Machine Manager (VMM) for the specified failover cluster or one of its nodes. If the cluster is found, VMM returns an object that contains more information about the failover cluster. Information returned by Find-SCCluster includes cluster name, nodes of the cluster, and highly available file servers hosted by the cluster.
Examples
Example 1: Find all nodes of a failover cluster from the cluster name
PS C:\> $Credential = Get-SCRunAsAccount -Name "RunAsAccount01"
PS C:\> $Cluster = Find-SCCluster -ComputerName "VMHostCluster01.Contoso.com" -Credential $Credential
PS C:\> $Cluster.ClusterNodes
The first command gets the Run As account object named RunAsAccount01 and stores the object in the $Credential variable.
The second command queries VMM for the failover cluster named VMHostCluster01 and stores the cluster object in $Cluster, using $Credential to provide the Run As account to Find-SCCluster. The ComputerName parameter treats the name of the cluster as if it were the name of a computer.
The last command displays the FQDNs of the cluster nodes to the user.
Example 2: Find all nodes of a failover cluster from one of the node names
PS C:\> $Credential = Get-SCRunAsAccount -Name "RunAsAccount01"
PS C:\> $Cluster = Find-SCCluster -ComputerName "VMHostNode02.Contoso.com" -Credential $Credential
PS C:\> $Cluster.Name
PS C:\> $Cluster.ClusterNodes
The first command gets the Run As account object named RunAsAccount01 and stores the object in the $Credential variable.
The second command queries VMM for a failover cluster node named VMHostNode02 and stores the returned cluster object in $Cluster.
The third command displays the FQDN of the cluster to the user.
The last command displays the FQDN of each node in the cluster to the user.
Example 3: Find, by using the cluster name, all highly available file servers hosted by that failover cluster
PS C:\> $Credential = Get-SCRunAsAccount -Name "RunAsAccount01"
PS C:\> $Cluster = Find-SCCluster -ComputerName "VMHostCluster03.Contoso.com" -Credential $Credential
PS C:\> $Cluster.HAFileServers
The first command gets the RunAs account object RunAsAccount01 and stores the object in the $Credential variable.
The second command queries VMM for the failover cluster named VMHostCluster03 and stores the cluster object in $Cluster.
The third command displays the FQDNs of all highly available file servers hosted by the failover cluster stored in $Cluster. This command assumes that the failover cluster is hosting at least one highly available file server.
Parameters
-ComputerName
Specifies the name of a computer that VMM can uniquely identify on your network. Valid formats are: fully qualified domain name (FQDN), IPv4 or IPv6 address, or NetBIOS name.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
UserCredentials
Position: | 0 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Credential
Specifies a credential object or, for some cmdlets, a Run As account object that contains the user name and password of an account that has permission to perform this action. Or, in the case of the Restart-SCJob cmdlet, has permission to complete a restarted task.
For more information about the PSCredential object, type: Get-Help Get-Credential
.
For more information about Run As accounts, type: Get-Help New-SCRunAsAccount
.
Parameter properties
Type: | VMMCredential |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
UserCredentials
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-EnumerateFileServers
Indicates whether the file servers are listed.
Parameter properties
Type: | Boolean |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
UserCredentials
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-JobVariable
Specifies that job progress is tracked and stored in the variable named by this parameter.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-LibraryServer
Specifies a VMM library server object.
Parameter properties
Type: | LibraryServer |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ServerCredentials
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-NonTrustedDomainHost
Indicates that the host to be added to VMM belongs to a non-trusted domain.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
UserCredentials
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-PROTipID
Specifies the ID of the Performance and Resource Optimization (PRO) tip that triggered this action. This allows for auditing of PRO tips.
Parameter properties
Type: | Guid |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-VMMServer
Specifies a VMM server object.
Parameter properties
Type: | ServerConnection |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Outputs
Cluster
This cmdlet returns a Cluster object.