Set-SCSMManagementGroupConnection

Set-SCSMManagementGroupConnection

Sets the specified connection as the active connection. The active connection is the connection that is implicitly used when you run a Get- cmdlet without specifying both a –ComputerName parameter and a –Credential parameter, or a –SCSession parameter. Only one connection can be active at any time. By default, the active connection is the last connection that was created by using the New-SCManagementGroupConnection cmdlet.

Syntax

Parameter Set: FromConnection
Set-SCSMManagementGroupConnection [-Connection] <Connection> [ <CommonParameters>]

Detailed Description

The Set-SCSMManagementGroupConnection cmdlet sets the specified connection as the active connection. The active connection is the connection that is implicitly used when you run a Get- cmdlet without specifying both a –ComputerName parameter and a –Credential parameter, or a –SCSession parameter. Only one connection can be active at any time. By default, the active connection is the last connection that was created by using the New-SCManagementGroupConnection cmdlet.

Parameters

-Connection<Connection>

Specifies the connection to activate. You can specify only one connection.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • Microsoft.SystemCenter.Core.Connection.Connection

    You can pipe a management group connection to the Connection parameter of the Set-SCSMManagementGroupConnection cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • None.

    This cmdlet does not generate any output.

Examples

-------------------------- EXAMPLE 1 --------------------------

The commands in this example activate a management group connection. The first command displays the IsActive state of the connection (False), and then the second command activates the connection. The final command verifies the activation by displaying the IsActive state of the connection, which has now changed to True.

PS C:\>Get-SCManagementGroupConnection
PS C:\>Get-SCManagementGroupConnection | Set-SCSMManagementGroupConnection
PS C:\>Get-SCManagementGroupConnection

Get-SCSMManagementGroupConnection

New-SCSMManagementGroupConnection

Remove-SCSMManagementGroupConnection