--- title: "Disconnect-VE" 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." canonical: "https://helpcenter.veeam.com/docs/mp/veshell/disconnect-ve.html" breadcrumb: "Veeam MP VEShell Reference > VEShell Cmdlets > Disconnect-VE" dateModified: "2026-09-10" --- # Disconnect-VE Closes a connection to the Virtualization Extensions Service. **Applies to versions**: 8.0, 9.0, 9a ## Syntax ``` Disconnect-VE [-ConnectionSession] [] ``` ## 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 \ 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

### \ This cmdlet supports Microsoft PowerShell common parameters.For more information about common parameters, see [Microsoft Docs](http://go.microsoft.com/fwlink/p/?LinkID=113216). ## Input The cmdlet accepts the [Veeam.Psves.VesConnection](connection.md) object as the input value. ## Output The cmdlet returns a [Veeam.Psves.VesConnection](connection.md) 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`](connect-ve.md) 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 ```