Remove-SCManagementGroupConnection
Removes a management group connection.
Syntax
Default (Default)
Remove-SCManagementGroupConnection
[-Connection] <Connection[]>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Remove-SCManagementGroupConnection cmdlet removes a management group connection.
Examples
Example 1: Display and remove management server sessions
PS C:\>Get-SCManagementGroupConnection
ManagementServerName ManagementGroupName Domain UserName IsActive
-------------------- ------------------- ------ -------- --------
localhost MyManagementGroup False
localhost MyManagementGroup CONTOSO Administrator True
PS C:\>Get-SCManagementGroupConnection |?{$_.IsActive }
ManagementServerName ManagementGroupName Domain UserName IsActive
-------------------- ------------------- ------ -------- --------
localhost MyManagementGroup CONTOSO Administrator True
PS C:\>Get-SCManagementGroupConnection |?{$_.IsActive } | Remove-SCManagementGroupConnection
PS C:\>Get-SCManagementGroupConnection
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.
Parameter properties
| Type: | System.Management.Automation.SwitchParameter |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | cf |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-Connection
Specifies the connection, originating from the Get-SCManagementGroupConnection cmdlet, to be removed.
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 |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
| Type: | System.Management.Automation.SwitchParameter |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | wi |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| 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 pipe a management group connection to the Connection parameter of the cmdlet.
Outputs
None
This cmdlet does not generate any output.