Disconnect-SrmServer Command | Vmware PowerCLI Reference

Disconnect-SrmServer

This cmdlet logs out and closes the connection to one or more SRM servers. In PowerCLI, you can have multiple connections to a server. In order to disconnect from a server, you must close all active connections to it. By default, Disconnect-SrmServer closes only the last connection to the specified server. To close all active connections to a server, use the Force parameter or run the cmdlet for each connection.

Syntax

Disconnect-SrmServer
[-Force ]
[-ProgressAction < ActionPreference > ]
[-Server < SrmServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
optional Force SwitchParameter named
Indicates that you want to close all active connections to the specified SRM server and disconnect from it. If the value is $false, the cmdlet closes only the last connection to the specified server and you must run Disconnect-SrmServer for each active connection to this server in order to disconnect from it.
optional ProgressAction ActionPreference named
optional Server SrmServer[] named
  • pipeline
  • wildcards
Specifies the SRM servers you want to disconnect from.

Output

Examples

Example 1

Disconnect-SrmServer -Server '*' -Force

Disconnects all SRM server connections.

Example 2

$srmServer = Connect-SrmServer -SrmServerAddress "mySrmServerIp" -User "mySrmUSer" -Password "mySrmPassword"
Disconnect-SrmServer -Server $srmServer

Connects to a specified SRM server by passing the local site credentials for login and then invokes the cmdlet to disconnect from the that server.

Example 3

Disconnect-SrmServer -Server $global:DefaultSrmServers -Force

Logs out and closes all connections to the SRM servers included in the default list of connections established to SRM servers.

Related Commands

SrmServer

This cmdlet establishes a connection to a vCenter Site Recovery Manager (SRM) server.

This cmdlet closes the connection to one or more vCenter Site Recovery Manager (SRM) servers.