Disconnect-VE

Closes a connection to the Virtualization Extensions Service.

Applies to versions: 8.0, 9.0, 9a

Syntax

Disconnect-VE [-ConnectionSession] <VesConnection> [<CommonParameters>]

Detailed Description

This cmdlet closes a previously opened connection to the Virtualization Extensions Service. After the connection is closed, you can no longer perform configuration of Virtualization Extensions Service using VEShell cmdlets.

To close an active connection to the Virtualization Extensions Service, you need to pass an object of a previously opened connection to the cmdlet.

Parameters

-ConnectionSession <VesConnection>

Specifies the connection object created for the Virtualization Extensions Service.

Description

Aliases

 

Required?

True

Position?

1

Default Value

 

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters.For more information about common parameters, see Microsoft Docs.

Input

The cmdlet accepts the Veeam.Psves.VesConnection object as the input value.

Output

The cmdlet returns a Veeam.Psves.VesConnection object that stores settings for connecting to the Virtualization Extensions Service. The State property of the object is set to “Close”.

Example

This example shows how to create and open a connection to the Virtualization Extensions Service, register a VMware server and then close the connection.

  1. The first command creates a connection to the Virtualization Extensions Service running on the server1 machine and stores it in the $conn variable.
  2. The second command opens the connection with the specified Virtualization Extensions Service. The created connection session object is passed as the -ConnectionSession parameter to the Connect-VE cmdlet.
  3. The third command registers a new VMware server.
  4. The fourth command closes the connection to the Virtualization Extensions Service.

$conn=New-VEConnection –ComputerName server1

Connect-VE $conn

Add-VMwareServer … -VESServer $conn

Disconnect-VE $conn