Syntax
Disconnect-SrmServer [[-Server] <SrmServer[]>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]Related Commands
Online versionDetailed Description
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.Parameters
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Server | SrmServer[] | Specifies the SRM 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 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. | 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 --------------
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.