Test-ServiceFabricClusterConnection
Checks and confirms that you are connected to a Service Fabric cluster.
Syntax
Default (Default)
Test-ServiceFabricClusterConnection
[-AllowNetworkConnectionOnly]
[-TimeoutSec <Int32>]
[<CommonParameters>]
Description
The Test-ServiceFabricClusterConnection cmdlet tests whether a connection to a Service Fabric cluster exists. Before you perform any operation on a Service Fabric cluster, establish a connection to the cluster by using the Connect-ServiceFabricCluster cmdlet.
Examples
Example 1: Test that a current connection to a cluster exists
PS C:\> Test-ServiceFabricClusterConnection
True
This command verifies that a current connection to a Service Fabric cluster exists.
Example 2: Test that a current connection to a cluster exists
PS C:\> Test-ServiceFabricClusterConnection
Test-ServiceFabricClusterConnection : Cluster connection instance is null
In this case, a current connection to a Service Fabric cluster does not exist and has to be set up using the Connect-ServiceFabricCluster cmdlet.
Parameters
-AllowNetworkConnectionOnly
Indicates that the cmdlet returns "True" if it can connect to the cluster even when system services are unresponsive. That is, as long as an underlying network connection can be established to the cluster, it returns "True".
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 |
-TimeoutSec
Specifies the time-out period, in seconds, for the operation.
Parameter properties
Type: | Int32 |
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 |
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.