About_Management_Group_Connections

Applies To: System Center 2012 - Service Manager, System Center 2012 SP1 - Service Manager

The set of cmdlets includes the following cmdlets for managing management group connections:

  • Get-SCSMManagementGroupConnection: Retrieves management group connections.

  • New-SCSMManagementGroupConnection: Creates a new management group connection.

  • Remove-SCSMManagementGroupConnection: Removes a management group connection.

  • Set-SCSMManagementGroupConnection: Sets the active management group connection.

About Management Group Connections

The Get- cmdlets that are included in the set of cmdlets retrieve objects from management groups. These operations require connections to the respective management groups. You can provide values for the ComputerName and the Credential parameters in the Get- cmdlets, or you can provide a value for the SCSession parameter. The value for the -SCSession parameter represents a management group connection that is created by the New-SCManagementGroupConnection cmdlet and that is later retrieved by the Get-SCManagementGroupConnection cmdlet.

The Active Management Group Connection

One of the management group connections is always active. Only one connection can be active at any time. When you run the Get-SCManagementGroupConnection cmdlet, in the output the active connection is designated by a True value in the IsActive column. The active connection is the connection that is used implicitly whenever you run a Get- cmdlet without specifying either the -ComputerName and -Credential or the –SCSession parameters.

By default, the last connection that is created with the New-SCManagementGroupConnection cmdlets is designated as the active connection. You can override this behavior and designate another connection to be the active connection by getting the connection that you want and then piping it to the Set-SCManagementGroupConnection cmdlet.

The following example shows how you can designate localhost as the default connection:

PS C:\> Get-SCManagementGroupConnection -ComputerName localhost | Set-SCManagementGroupConnection

PS C:\> Get-SCManagementGroupConnection


ManagementServerName    ManagementGroupName                 Domain          UserName             IsActive
-------------------     ---------------------------        --------        ------------           --------

localhost                   aaa                                                                    True

ranger04d.smx.net            a                                                                     False

If you call the Get-SCSMManagementGroupConnection cmdlet without the -ComputerName and the -SCSession parameters, it returns the connectors on localhost.