Find-SCCluster

Finds the specified failover cluster in a VMM environment.

Syntax

Find-SCCluster
    [-VMMServer <ServerConnection>]
    [-ComputerName] <String>
    [-EnumerateFileServers <Boolean>]
    [-NonTrustedDomainHost]
    -Credential <VMMCredential>
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]
Find-SCCluster
    [-VMMServer <ServerConnection>]
    -LibraryServer <LibraryServer>
    [-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.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters: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.

Type:VMMCredential
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-EnumerateFileServers

Indicates whether the file servers are listed.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-LibraryServer

Specifies a VMM library server object.

Type:LibraryServer
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-NonTrustedDomainHost

Indicates that the host to be added to VMM belongs to a non-trusted domain.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PROTipID

Specifies the ID of the Performance and Resource Optimization (PRO) tip that triggered this action. This allows for auditing of PRO tips.

Type:Guid
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Outputs

Cluster

This cmdlet returns a Cluster object.