共用方式為


Set-SCSMManagementGroupConnection

設定作用中的管理群組連線。

語法

Set-SCSMManagementGroupConnection
   [-Connection] <Connection>
   [<CommonParameters>]

Description

Set-SCSMManagementGroupConnection Cmdlet 會將指定的連線設定為使用中連線。 使用中連接是在您執行 get Get Cmdlet 時隱含使用的連線,而不需同時指定 ComputerName 參數和 Credential 參數或 SCSession 參數。 隨時只能有一個連線作用中。 根據預設,使用中聯機是使用 New-SCSMManagementGroupConnection Cmdlet 所建立的最後一個連線。

範例

範例 1:啟用管理群組連線

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

這些命令會啟動管理群組連線。 第一個命令會顯示連線 IsActive 狀態(False),然後第二個命令會啟動連線。 最後一個命令會藉由顯示連線的 IsActive 狀態來驗證啟用,該狀態現在已變更為 true

參數

-Connection

指定要啟動的連線。 您只能指定一個連線。

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

輸入

Microsoft.SystemCenter.Core.Connection.Connection

您可以使用管線運算符,將管理群組連線傳送至 Set-SCSMManagementGroupConnection Cmdlet 的 Connection 參數。

輸出

None.

此 Cmdlet 不會產生任何輸出。