Share via


Set-SCManagementGroupConnection

Sets the active management group connection.

Syntax

Default (Default)

Set-SCManagementGroupConnection
    [-Connection] <Connection>
    [<CommonParameters>]

Description

The Set-SCManagementGroupConnection 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.

Examples

Example 1: Activate a management group connection

PS C:\>Get-SCManagementGroupConnection
ManagementServerName    ManagementGroupName                 Domain          UserName             IsActive
--------------------    -------------------                 ------          --------             --------
localhost               MyManagementGroup                                                        False


PS C:\>Get-SCManagementGroupConnection | Set-SCManagementGroupConnection
PS C:\>Get-SCManagementGroupConnection
ManagementServerName    ManagementGroupName                 Domain          UserName             IsActive
--------------------    -------------------                 ------          --------             --------
localhost               MyManagementGroup                                                        True

These commands 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.

Parameters

-Connection

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

Parameter properties

Type:Microsoft.SystemCenter.Core.Connection.Connection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.SystemCenter.Core.Connection.Connection

You can send a management group connection to the Connection parameter of the Set-SCManagementGroupConnection cmdlet by using the pipeline operator.

Outputs

None.

This cmdlet does not generate any output.