Set-CMServiceConnectionPoint

設定服務連接點。

語法

Set-CMServiceConnectionPoint
   -InputObject <IResultObject>
   [-Mode <ServiceConnectionPointMode>]
   [-PassThru]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-CMServiceConnectionPoint
   [-Mode <ServiceConnectionPointMode>]
   [-PassThru]
   [-SiteCode <String>]
   [-SiteSystemServerName] <String>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Set-CMServiceConnectionPoint 會更新連線服務點的設定。

注意事項

從 Configuration Manager 月臺磁碟驅動器執行 Configuration Manager Cmdlet,例如 PS XYZ:\>。 如需詳細資訊,請 參閱開始使用

範例

範例 1:設定服務連接點

PS XYZ:\> Set-CMServiceConnectionPoint -SiteSystemServerName "SiteSystemServer01.Contoso.com" -SiteCode PS1 -Mode Offline

此命令會將名為 SiteSystemServer01.Contoso.com 的站台系統伺服器模式設定為離線。

範例 2:使用變數設定服務連接點

PS XYZ:\> $Server = Get-CMServiceConnectionPoint -SiteCode PS1 -SiteSystemServerName "SiteSystemServer02.Contoso.com"
PS XYZ:\> Set-CMServiceConnectionPoint -InputObject $Server -Mode Offline

第一個命令會取得名為 SiteSystemServer02.Contoso.com 月臺碼 PS1 的月台系統伺服器物件,並將物件儲存在 $Server 變數中。

第二個命令會將儲存在 $Server 中的站台系統伺服器模式設定為離線。

範例 3:使用管線設定服務連接點

PS XYZ:\> Get-CMServiceConnectionPoint -SiteCode PS1 -SiteSystemServerName "SiteSystemServer03.Contoso.com" | Set-CMServiceConnectionPoint -Mode Offline

此命令會取得名為 SiteSystemServer03.Contoso.com 月臺碼 PS1 的月台系統伺服器物件,並使用管線運算符將對象傳遞至 Set-CMServiceConnectionPoint,這會將伺服器物件的模式設定為離線。

參數

-Confirm

執行 Cmdlet 之前提示您確認。

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

-DisableWildcardHandling

此參數會將通配符視為常值字元值。 您無法將其與 ForceWildcardHandling 結合。

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ForceWildcardHandling

此參數會處理通配符,並可能導致非預期的行為 (不建議) 。 您無法將其與 DisableWildcardHandling 結合。

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-InputObject

指定服務連接點物件。 若要取得服務連接點物件,請使用 Get-CMServiceConnectionPoint Cmdlet。

類型:IResultObject
別名:ServiceConnectionPoint
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Mode

指定服務連接點的模式。 有效值為:

  • 線上
  • 離線
類型:ServiceConnectionPointMode
接受的值:Online, Offline
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-PassThru

新增此參數以傳回 物件,代表您正在使用的專案。 根據預設,此 Cmdlet 可能不會產生任何輸出。

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-SiteCode

指定 Configuration Manager 月臺的月臺碼。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-SiteSystemServerName

指定裝載服務連接點角色的月台系統伺服器名稱。

類型:String
別名:Name, ServerName
Position:0
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-WhatIf

顯示執行 Cmdlet 時會發生什麼情況。 Cmdlet 不會執行。

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

輸入

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

輸出

IResultObject