共用方式為


Remove-SCSMManagementGroupConnection

拿掉管理群組連線。

語法

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

Description

Remove-SCSMManagementGroupConnection Cmdlet 會移除管理群組連線。

範例

範例 1:顯示和移除管理伺服器會話

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

這些命令會顯示管理伺服器會話、移除使用中的管理伺服器會話,然後顯示可用的工作階段來確認移除。

參數

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

類型:System.Management.Automation.SwitchParameter
別名:cf
Position:Named
預設值:False
必要:False
接受管線輸入:False
接受萬用字元:False

-Connection

指定要移除 Get-SCSMManagementGroupConnection Cmdlet 的連線。

類型:Microsoft.SystemCenter.Core.Connection.Connection[]
Position:1
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

類型:System.Management.Automation.SwitchParameter
別名:wi
Position:Named
預設值:False
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

Microsoft.SystemCenter.Core.Connection.Connection

您可以使用管線將管理群組連線傳送至 Cmdlet 的 Connection 參數。

輸出

此 Cmdlet 不會產生任何輸出。