Remove-SCSMManagementGroupConnection

Removes a management group connection.

Syntax

Remove-SCSMManagementGroupConnection
      [-Connection] <Connection[]>
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-SCSMManagementGroupConnection cmdlet removes a management group connection.

Examples

Example 1: Display and remove management server sessions

PS C:\>Get-SCSMManagementGroupConnection
ManagementServerName    ManagementGroupName                 Domain          UserName             IsActive
--------------------    -------------------                 ------          --------             --------
localhost               MyManagementGroup                                                        False
localhost               MyManagementGroup                   CONTOSO         Administrator        True


PS C:\>Get-SCSMManagementGroupConnection |?{$_.IsActive }
ManagementServerName    ManagementGroupName                 Domain          UserName             IsActive
--------------------    -------------------                 ------          --------             --------
localhost               MyManagementGroup                   CONTOSO         Administrator        True


PS C:\>Get-SCSMManagementGroupConnection |?{$_.IsActive } | Remove-SCSMManagementGroupConnection
PS C:\>Get-SCSMManagementGroupConnection
ManagementServerName    ManagementGroupName                 Domain          UserName             IsActive
--------------------    -------------------                 ------          --------             --------
localhost               MyManagementGroup                                                        False

These commands display management server sessions, remove the active management server session, and then display the available sessions to verify the removal.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Connection

Specifies the connection, originating from the Get-SCSMManagementGroupConnection cmdlet, to be removed.

Type:Connection[]
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.SystemCenter.Core.Connection.Connection

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

Outputs

This cmdlet does not generate any output.