Syntax
Disconnect-HCXServer [[-Server] <CisServer[]>] [-Confirm] [-Force] [-WhatIf] [<CommonParameters>]Related Commands
Detailed Description
This cmdlet closes the connection to one or more HCX servers.Parameters
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Server | CisServer[] | Specifies the HCX servers you want to disconnect from. | false | True (ByValue) | |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | False | |
Force | SwitchParameter | Indicates that you want to close all active connections to the specified server and disconnect from it. | false | False | |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | False |
Return Type
System.VoidNotes
Examples
-------------------------- Example 1 --------------------------
$server = Connect-HCXServer -Server 'server_name' -User 'user@domain' -Password 'user_password' Disconnect-HCXServer $server -Confirm:$false
Disconnects the specified HCX server without asking for confirmation.
-------------------------- Example 2 --------------------------
Connect-HCXServer -Server 'server_name' -User 'user@domain' -Password 'user_password' Connect-HCXServer -Server 'server2_name' -User 'user@domain' -Password 'user_password' Disconnect-HCXServer * -Confirm:$false
Disconnects the specified HCX server without asking for confirmation.