Find-SCCluster
Find-SCCluster
Finds the specified failover cluster in a VMM environment.
Syntax
Parameter Set: UserCredentials
Find-SCCluster [-ComputerName] <String> -Credential <VMMCredential> [-EnumerateFileServers <Boolean]> ] [-JobVariable <String> ] [-NonTrustedDomainHost] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: ServerCredentials
Find-SCCluster -LibraryServer <LibraryServer> [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: XenServerHost
Find-SCCluster [-ComputerName] <String> -Credential <VMMCredential> -XenServerHost [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-TCPPort <UInt32]> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Detailed 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.
Parameters
-ComputerName<String>
Specifies the name of a computer that VMM can uniquely identify on your network. Valid formats are:
-- FQDN
-- IPv4 or IPv6 address
-- NetBIOS name
NOTE: See the examples for a specific cmdlet to determine how that cmdlet specifies the computer name.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Credential<VMMCredential>
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 Restart-SCJob, 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
.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-EnumerateFileServers<Boolean]>
Indicates whether the file servers are listed.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-JobVariable<String>
Specifies that job progress is tracked and stored in the variable named by this parameter.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-LibraryServer<LibraryServer>
Specifies a VMM library server object.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-NonTrustedDomainHost
Indicates that the host to be added to VMM belongs to a non-trusted domain.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-PROTipID<Guid]>
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-TCPPort<UInt32]>
Specifies a numeric value that represents a TCP port.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-VMMServer<ServerConnection>
Specifies a VMM server object.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-XenServerHost
Indicates that the specified host is a Citrix XenServer host.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
- Cluster
Examples
Example 1: Find all nodes of a failover cluster from the cluster name
The first command gets the Run As account object named RunAsAccount01, and then stores the object in the $Credential variable.
The second command queries VMM for the failover cluster named VMHostCluster01, and then 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.
PS C:\> $Credential = Get-SCRunAsAccount -Name "RunAsAccount01"
PS C:\> $Cluster = Find-SCCluster -ComputerName "VMHostCluster01.Contoso.com" -Credential $Credential
PS C:\> $Cluster.ClusterNodes
Example 2: Find all nodes of a failover cluster from one of the node names
The first command gets the Run As account object named RunAsAccount01, and then 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.
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
Example Example 3: Find, by using the cluster name, all highly available file servers hosted by that failover cluster.
The first command gets the RunAs account object RunAsAccount01, and then stores the object in the $Credential variable.
The second command queries VMM for the failover cluster named VMHostCluster03, and then 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 example assumes that the failover cluster is hosting at least one highly available file server.
PS C:\> $Credential = Get-SCRunAsAccount -Name "RunAsAccount01"
PS C:\> $Cluster = Find-SCCluster -ComputerName "VMHostCluster03.Contoso.com" -Credential $Credential
PS C:\> $Cluster.HAFileServers