Set-SCSMManagementGroupConnection
Sets the active management group connection.
Syntax
Set-SCSMManagementGroupConnection
[-Connection] <Connection>
[<CommonParameters>]
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-SCSMManagementGroupConnection cmdlet.
Examples
Example 1: Activate a management group connection
PS C:\>Get-SCManagementGroupConnection
ManagementServerName ManagementGroupName Domain UserName IsActive
-------------------- ------------------- ------ -------- --------
localhost MyManagementGroup False
PS C:\>Get-SCSMManagementGroupConnection | Set-SCSMManagementGroupConnection
PS C:\>Get-SCSMManagementGroupConnection
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.
Type: | Microsoft.SystemCenter.Core.Connection.Connection |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
Microsoft.SystemCenter.Core.Connection.Connection
You can send a management group connection to the Connection parameter of the Set-SCSMManagementGroupConnection cmdlet by using the pipeline operator.
Outputs
None.
This cmdlet does not generate any output.