PowerCLI Reference

Disconnect-OMServer

Synopsis

This cmdlet closes the connection to one or more vRealize Operations Manager servers.

Syntax

Disconnect-OMServer [[-Server] <OMServer[]>] [-Force] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Connect-OMServer

Detailed Description

This cmdlet closes the connection to one or more vRealize Operations Manager servers.

When no servers and no user name are specified, and if there is only one connected server in $DefaultOMServers variable, this server is disconnected. If there is no connected server, the cmdlet throws a terminating error.

This functionality is using the reference counting mechanism. For more information about the mechanism, see Connect-OMServer.

When there are no more active connections to the server it gets disconnected and then it is removed from the $DefaultOMServers variable. For more information about this variable, see Connect-OMServer.

If -Force is specified, the server is disconnected even if there is more than one connection to it.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
ServerOMServer[]Specifies the vRealize Operations Manager servers you want to disconnect from.falsetrue (ByValue)
ConfirmSwitchParameterIf 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.falsefalse
ForceSwitchParameterSpecifies that you want to remove all existing connections to the specified servers.falsefalse
InformationActionActionPreferencefalsefalse
InformationVariableStringfalsefalse
PipelineVariableStringfalsefalse
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

None

Notes

Examples

-------------- Example 1 --------------

$server = Connect-OMServer -Server 'server_name' -User 'user@domain' -Password 'user_password'
Disconnect-OMServer -Server serverIP -Force

Disconnects the specified vRealize Operations Manager server and closes all existing connections to it.

-------------- Example 2 --------------

Connect-OMServer -Server 'server_name' -User 'user@domain' -Password 'user_password'
Connect-OMServer -Server 'server2_name' -User 'user@domain' -Password 'user_password'
Disconnect-OMServer * -Confirm:$false

Disconnects all connected vRealize Operations Manager servers without asking for confirmation.


Copyright © VMware, Inc. All rights reserved.