Disconnect-QADService

From PowerGUI Wiki

Jump to: navigation, search

Close the connection, if any exists. A connection could be established by using the Connect-QADService cmdlet.

Contents

Syntax

Disconnect-QADService [-Proxy] [-Service <String>] [-ConnectionAccount <String>] [-ConnectionPassword <SecureString>] [-Credential <PSCredential>] [-Connection <ArsConnection>] [-UseGlobalCatalog] [<CommonParameters>]

Detailed Description

Any connection established using the Connect-QADService cmdlet must be finally closed by executing the Disconnect-QADService cmdlet. The cmdlet closes the last open connection, if any.

This cmdlet takes the same optional connection parameters as the Connect-QADService cmdlet. If the -Connection parameter is present, the cmdlet closes both the last open connection and the connection specified by the value of that parameter. If no connection is currently open, the cmdlet attempts to establish a connection in accordance with the connection parameters specified, and then closes the connection.



Related Commands

Parameters

Name Description Required? Pipeline Input Default Value
Proxy For parameter description, see help on the Connect-QADService cmdlet. false false
Service For parameter description, see help on the Connect-QADService cmdlet. false false
ConnectionAccount For parameter description, see help on the Connect-QADService cmdlet. false false
ConnectionPassword For parameter description, see help on the Connect-QADService cmdlet. false false
Credential For parameter description, see help on the Connect-QADService cmdlet. false false
Connection For parameter description, see help on the Connect-QADService cmdlet. false true (ByValue)
UseGlobalCatalog For parameter description, see help on the Connect-QADService cmdlet. false false

Examples

Example 1

disconnect-QADService

Close the last open connection, if any.

Example 2

disconnect-QADService -connection $conn

Close the last open connection and also close the connection defined by an AdsiConnection object that was earlier saved in the $conn variable.

Personal tools