Syntax
Disconnect-CisServer [[-Server] <CisServer[]>] [-Force] [-Confirm] [-WhatIf] [<CommonParameters>]Related Commands
Online VersionDetailed Description
This cmdlet closes the connection to one or more vSphere Automation SDK servers.Parameters
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Server | CisServer[] | Specifies the vSphere Automation SDK 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 | Specifies that you want to remove all existing connections to the specified servers. | 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
NoneNotes
Examples
-------------------------- Example 1 --------------------------
$server = Connect-CisServer -Server 'server_name' -User 'user@domain' -Password 'user_password' Disconnect-CisServer $server -Confirm:$false
Disconnects the specified vSphere Automation SDK server without asking for confirmation.
-------------------------- Example 2 --------------------------
Connect-CisServer -Server 'server_name' -User 'user@domain' -Password 'user_password' Connect-CisServer -Server 'server2_name' -User 'user@domain' -Password 'user_password' Disconnect-CisServer * -Confirm:$false
Disconnects all connected vSphere Automation SDK servers without asking for confirmation.