NAME

Invoke-DcsWitnessContact

SYNOPSIS

Tests witness connectivity by issuing a request asynchronously to all servers in the local server group to attempt to contact the specified witness, and returns the results for all servers.

SYNTAX

Invoke-DcsWitnessContact   -Witness <Object>   [ -Connection <String> ]   [ -PipelineVariable <String> ]

DESCRIPTION

Tests witness connectivity by issuing a request asynchronously to all servers in the local server group to attempt to contact the specified witness, and returns the results for all servers. The response is Success or ErrorEncountered.

PARAMETERS

-Witness<Object>
Name, object, or ID that identifies the witness.

Required: true
Position: named
Default value:
Accept pipeline input: true (ByValue)
Accept wildcard characters: false

-Connection<String>
Alias of the connection to the server group. If not specified, the default connection is used.

Required: false
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

-PipelineVariable<String>

Required: false
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

INPUTS

WitnessData : Object that identifies the witness.

OUTPUTS

WitnessResponseData : Object containing the servers responses from the witness contact request.

NOTES

Related cmdllets: Add-DcsWitness, Get-DcsWitness, Set-DcsWitnessProperties, Set-DcsServerGroupDefaultWitnessProperties, Set-DcsVirtualDiskWitnessProperties, Remove-DcsWitness.

EXAMPLES


-------------- Example 1 Issues contact request for the witness --------------
Get-DcsWitness | Invoke-DcsWitnessContact

In the example, there is one witness configured for the server group. The cmdlet Get-DcsWitness is used to retrieve the WitnessData object which is piped to the cmdlet Invoke-DcsWitnessContact, which returns the WitnessResponseData for the witness.

ServerId                                WitnessId                                                        ResponseStatus
--------                                ---------                                                        --------------
49949EE7-BF92-4833-A880-8BBCD096750B    2ebabefa4a6d42d282fa4d83d83c9d4a                                        Success
79E57CB3-F7A6-48C1-B079-CAAEE2183ACE    2ebabefa4a6d42d282fa4d83d83c9d4a                                        Success
373B4037-4A93-4FD3-A7B4-C416DCCFD2CA    2ebabefa4a6d42d282fa4d83d83c9d4a                                        Success
24ECF19D-034F-4875-97B9-B529350B9A8D    2ebabefa4a6d42d282fa4d83d83c9d4a                                        Success