Connect-ServiceFabricCluster
Creates a connection to a Service Fabric cluster.
Syntax
Connect-ServiceFabricCluster
[[-ConnectionEndpoint] <String[]>]
[-AllowNetworkConnectionOnly]
[-ConnectionInitializationTimeoutInSec <Double>]
[-HealthOperationTimeoutInSec <Double>]
[-HealthReportSendIntervalInSec <Double>]
[-HealthReportRetrySendIntervalInSec <Double>]
[-KeepAliveIntervalInSec <Double>]
[-ServiceChangePollIntervalInSec <Double>]
[-PartitionLocationCacheLimit <Int64>]
[-AuthTokenBufferSize <Int64>]
[-SkipChecks <Boolean>]
[-TimeoutSec <Int32>]
[<CommonParameters>]
Connect-ServiceFabricCluster
[-ConnectionEndpoint] <String[]>
[-AllowNetworkConnectionOnly]
[-WindowsCredential]
[-ClusterSpn <String>]
[-ConnectionInitializationTimeoutInSec <Double>]
[-HealthOperationTimeoutInSec <Double>]
[-HealthReportSendIntervalInSec <Double>]
[-HealthReportRetrySendIntervalInSec <Double>]
[-KeepAliveIntervalInSec <Double>]
[-ServiceChangePollIntervalInSec <Double>]
[-PartitionLocationCacheLimit <Int64>]
[-AuthTokenBufferSize <Int64>]
[-SkipChecks <Boolean>]
[-TimeoutSec <Int32>]
[<CommonParameters>]
Connect-ServiceFabricCluster
[-ConnectionEndpoint] <String[]>
[-AllowNetworkConnectionOnly]
[-X509Credential]
[-ServerCommonName <String[]>]
[-ServerCertThumbprint <String[]>]
-FindType <X509FindType>
-FindValue <String>
[-StoreLocation <StoreLocation>]
[-StoreName <String>]
[-ConnectionInitializationTimeoutInSec <Double>]
[-HealthOperationTimeoutInSec <Double>]
[-HealthReportSendIntervalInSec <Double>]
[-HealthReportRetrySendIntervalInSec <Double>]
[-KeepAliveIntervalInSec <Double>]
[-ServiceChangePollIntervalInSec <Double>]
[-PartitionLocationCacheLimit <Int64>]
[-AuthTokenBufferSize <Int64>]
[-SkipChecks <Boolean>]
[-TimeoutSec <Int32>]
[<CommonParameters>]
Connect-ServiceFabricCluster
[-ConnectionEndpoint] <String[]>
[-AllowNetworkConnectionOnly]
[-ServerCommonName <String[]>]
[-ServerCertThumbprint <String[]>]
[-DSTS]
-MetaDataEndpoint <String>
[-CloudServiceName <String>]
[-CloudServiceDNSNames <String[]>]
[-ConnectionInitializationTimeoutInSec <Double>]
[-HealthOperationTimeoutInSec <Double>]
[-HealthReportSendIntervalInSec <Double>]
[-HealthReportRetrySendIntervalInSec <Double>]
[-KeepAliveIntervalInSec <Double>]
[-ServiceChangePollIntervalInSec <Double>]
[-PartitionLocationCacheLimit <Int64>]
[-AuthTokenBufferSize <Int64>]
[-Interactive <Boolean>]
[-SkipChecks <Boolean>]
[-TimeoutSec <Int32>]
[<CommonParameters>]
Connect-ServiceFabricCluster
[-ConnectionEndpoint] <String[]>
[-AllowNetworkConnectionOnly]
[-ServerCommonName <String[]>]
[-ServerCertThumbprint <String[]>]
[-AzureActiveDirectory]
[-SecurityToken <String>]
[-GetMetadata]
[-ConnectionInitializationTimeoutInSec <Double>]
[-HealthOperationTimeoutInSec <Double>]
[-HealthReportSendIntervalInSec <Double>]
[-HealthReportRetrySendIntervalInSec <Double>]
[-KeepAliveIntervalInSec <Double>]
[-ServiceChangePollIntervalInSec <Double>]
[-PartitionLocationCacheLimit <Int64>]
[-AuthTokenBufferSize <Int64>]
[-SkipChecks <Boolean>]
[-TimeoutSec <Int32>]
[<CommonParameters>]
Description
The Connect-ServiceFabricCluster cmdlet creates a connection to a standalone Service Fabric cluster that allows you to run management actions for that cluster. After you connect to a cluster, you can view the settings of the connection by using the Get-ServiceFabricClusterConnection cmdlet.
To manage Service Fabric clusters, start Windows PowerShell by using the Run as administrator option.
Examples
Example 1: Connect to a cluster
PS C:\> Connect-ServiceFabricCluster -ConnectionEndpoint "ServiceFabric01.ContosoCloudApp.net:19000"
This command creates a connection to the specified cluster.
Example 2: Connect to a cluster using an X.509 certificate
PS C:\> $ConnectArgs = @{ ConnectionEndpoint = 'mycluster.cloudapp.net:19000'; X509Credential = $True; StoreLocation = 'CurrentUser'; StoreName = "MY"; ServerCommonName = "mycluster.cloudapp.net"; FindType = 'FindByThumbprint'; FindValue = "AA11BB22CC33DD44EE55FF66AA77BB88CC99DD00" }
PS C:\> Connect-ServiceFabricCluster @ConnectArgs
This command connects to a cluster using an X.509 certificate. This command uses the splatting feature of Windows PowerShell to create a hash table for parameters, and then supplies them to the Connect-ServiceFabricCluster cmdlet.
Example 3: Connect to a cluster using Azure Active Directory
PS C:\> $ConnectArgs = @{ ConnectionEndpoint = 'mycluster.cloudapp.net:19000'; AzureActiveDirectory = $True; ServerCertThumbprint = "AA11BB22CC33DD44EE55FF66AA77BB88CC99DD00" }
PS C:\> Connect-ServiceFabricCluster @ConnectArgs
This command connects to a cluster using Azure Active Directory (AAD) authentication. This command uses the splatting feature of Windows PowerShell to create a hash table for parameters, and then supplies them to the Connect-ServiceFabricCluster cmdlet.
Example 4: Connect to a cluster secured with a group-managed service account
PS C:\> $ConnectArgs = @{ ConnectionEndpoint = 'mycluster.cloudapp.net:19000'; WindowsCredential = $True; ClusterSpn = 'ServiceFabric/MyCluster.MyDomain.MyOrg' }
PS C:\> Connect-ServiceFabricCluster @connectArgs
This command uses the splatting feature of Windows PowerShell to create a hash table for parameters, and then supplies them to the Connect-ServiceFabricCluster cmdlet.
Example 5: Connect to a cluster secured with machine accounts
PS C:\> $connectArgs = @{ ConnectionEndpoint = 'mycluster.cloudapp.net:19000'; WindowsCredential = $True; }
PS C:\> Connect-ServiceFabricCluster @connectArgs
This command connects to a cluster secured with machine accounts.
Example 6: Connect to a cluster without the primary checks
PS C:\> Connect-ServiceFabricCluster -ConnectionEndpoint -SkipChecks $True "ServiceFabric01.ContosoCloudApp.net:19000"
This command creates a connection to the specified cluster.
Parameters
Indicates that the cmdlet allows connecting to the cluster even when system services are unresponsive as long as an underlying network connection can be established.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
When connecting with AzureActiveDirectory, specifies the buffer size to allocate for security token acquisition.
| Type: | Int64 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies that Azure Active Directory should be used for authentication and authorization.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
This parameter is for internal use only.
| Type: | String[] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
This parameter is for internal use only.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the cluster security principal name to use for Windows credential.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies an array of connection endpoints for the cluster in the format ClusterAddress: ClientConnectionEndpoint, where ClusterAddress is the IPv4 address, IPv6 address, or fully qualified domain name (FQDN) of the cluster node to connect to and ClientConnectionEndpoint is the client connection port specified in the cluster manifest. Enclose IPv6 addresses in square brackets ([]). Valid endpoints have the following form:
IPv4Address:ClientConnectionEndpoint [IPv6Address]:ClientConnectionEndpoint FQDN:ClientConnectionEndpoint
| Type: | String[] |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the time-out period, in seconds, for the operation.
| Type: | Double |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
This parameter is for internal use only.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the type of FindValue for searching certificate in certificate store. The following filter types are supported:
- FindByThumbprint. Find certificate by certificate thumbprint.
- FindBySubjectName. Search certificate in certificate store by subject distinguished name or common name, when subject distinguished name is provided in FindValue, subject name in the certificate must be encoded in ASN encoding due to a restriction in native Windows crypto API. There is no such restriction when common name is provided in FindValue.
- FindBySubjectDistinguishedName
- FindByIssuerName
- FindByIssuerDistinguishedName
- FindBySerialNumber
- FindByTimeValid
- FindByTimeNotYetValid
- FindByTimeExpired
- FindByTemplateName
- FindByApplicationPolicy
- FindByCertificatePolicy
- FindByExtension
- FindByKeyUsage
- FindBySubjectKeyIdentifier
| Type: | X509FindType |
| Accepted values: | FindByThumbprint, FindBySubjectName, FindBySubjectDistinguishedName, FindByIssuerName, FindByIssuerDistinguishedName, FindBySerialNumber, FindByTimeValid, FindByTimeNotYetValid, FindByTimeExpired, FindByTemplateName, FindByApplicationPolicy, FindByCertificatePolicy, FindByExtension, FindByKeyUsage, FindBySubjectKeyIdentifier |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies filter value to search a certificate in certificate store.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
When connecting with AzureActiveDirectory, anonymously retrieves the metadata used for token acquisition and does not attempt any authentication.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the time-out period, in seconds, for sending health reports. When a health operation times out or fails with a communication error, the health client internally retries the operation.
| Type: | Double |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the interval, in seconds, at which the health client retries sending the reports that failed to be sent or to be persisted in health store. The minimum supported value is 1 second.
| Type: | Double |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the interval, in seconds, at which the health client sends the health reports to health store. If set to 0, the health client will send the reports immediately.
| Type: | Double |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Indicates whether the cmdlet operates interactively.
| Type: | Boolean |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the connection keep-alive period in seconds. This interval prevents a connection from being terminated because of inactivity during operations that run asynchronously.
| Type: | Double |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
This parameter is for internal use only.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the number of partitions cached for service resolution. The default value is 0, which signifies no limit.
| Type: | Int64 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
When connecting with AzureActiveDirectory, the specified security token is used directly for authentication and authorization rather than performing interactive user login.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies an array of the expected thumbprints for the cluster side. These thumbprints are used to authenticate that the cmdlet connects to the endpoint of the correct cluster during x509 or Azure Active Directory mutual authentication.
| Type: | String[] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies an array of the expected common names for the cluster side. These names are used to authenticate that the cmdlet connects to the endpoint of the correct cluster during x509 or Azure Active Directory mutual authentication.
| Type: | String[] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the interval, in seconds, at which the fabric client polls for service changes. This interval is used by old model of poll-based service address change notifications.
| Type: | Double |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Indicates to bypass system service responsiveness validation checks when connecting to the cluster.
| Type: | Boolean |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the store location of a certificate. The acceptable values for this parameter are:
- CurrentUser
- LocalMachine
| Type: | StoreLocation |
| Accepted values: | CurrentUser, LocalMachine |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the name of the certificate store to load the client certificate.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the time-out period, in seconds, for the operation.
| Type: | Int32 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Indicates that the cmdlet uses Windows credentials to connect to a Service Fabric cluster.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Indicates that the cmdlet uses an x509 certificate to perform mutual authentication with a Service Fabric cluster.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Inputs
None
Outputs
System.Object