Test-ServiceFabricClusterConnection
Checks and confirms that you are connected to a Service Fabric cluster.
Syntax
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".
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TimeoutSec
Specifies the time-out period, in seconds, for the operation.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None
Outputs
System.Object