共用方式為


New-SCOMAlertConnector

在 Service Manager 中建立新的 Operations Manager 警示連接器。

語法

New-SCOMAlertConnector
   [-CloseAlert]
   [[-Description] <String>]
   [-Enable <Boolean>]
   [-DisplayName] <String>
   -OperationsManagerServer <String>
   [-PassThru]
   [-ResolveIncident]
   [-Rules <AlertRule[]>]
   [-RunAsAccount <ManagementPackSecureReference>]
   [-PollIntervalInSeconds <Int32>]
   [-Template <ManagementPackObjectTemplate>]
   [-SyncNow]
   -SCOMCredential <PSCredential>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

New-SCOMAlertConnector Cmdlet 會在 Service Manager 中建立 Operations Manager 警示連接器。

範例

範例 1:建立 Operations Manager 警示連接器

PS C:\>$RunAsAccount = Get-SCSMRunAsAccount -UserName "AdminRA"
PS C:\> $Credential = Get-Credential
PS C:\> New-SCOMAlertConnector -DisplayName "SCOM ALERT CONNECTOR" -OperationsManagerServer "server.contoso.com" -SCOMCredential $Credential -RunAsAccount $RunAsAccount

第一個命令會使用 Get-SCSMRunAsAccount Cmdlet 取得 AdminRA 的執行身分帳戶。 命令會將結果儲存在 $RunAsAccount 變數中。

第二個命令會使用 Get-Credential Cmdlet 提示您輸入認證,然後將認證儲存在 $Credential 變數中。

最後一個命令會建立沒有規則的 Operations Manager 警示連接器,並使用預設範本。

參數

-CloseAlert

指定 Operations Manager 會在 Service Manager 中解決或關閉警示之後關閉警示。

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

-ComputerName

指定 System Center 資料存取服務執行所在的電腦名稱。 Credential 參數中指定的使用者帳戶必須具有指定計算機的訪問許可權。

類型:System.String[]
Position:Named
預設值:Localhost
必要:False
接受管線輸入:False
接受萬用字元:False

-Confirm

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

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

-Credential

指定此 Cmdlet 用來連線到 System Center 資料存取服務執行所在的伺服器認證。 指定的使用者帳戶必須具有該伺服器的訪問許可權。

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

-Description

指定連接器的描述。

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

-DisplayName

指定連接器的名稱。

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

-Enable

指出此 Cmdlet 是否啟用或停用連接器。

類型:System.Boolean
Position:Named
預設值:True
必要:False
接受管線輸入:False
接受萬用字元:False

-OperationsManagerServer

指定 Operations Manager 伺服器的名稱。

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

-PassThru

指出此 Cmdlet 會傳回它所建立的 Operations Manager 警示連接器。 您可以將這個物件傳遞至其他 Cmdlet。

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

-PollIntervalInSeconds

指定 Operations Manager 警示連接器的輪詢間隔,以秒為單位。

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

-ResolveIncident

指定此 Cmdlet 會將 Service Manager 設定為在 Operations Manager 關閉相關聯的警示之後自動解決事件。

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

-Rules

指定提供警示路由指示的規則。 提供警示路由指示的規則。

類型:Microsoft.EnterpriseManagement.ServiceManager.Connectors.OpsMgr.AlertRule[]
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-RunAsAccount

指定要在連接器同步處理期間使用的執行身分帳戶。

類型:Microsoft.EnterpriseManagement.Configuration.ManagementPackSecureReference
Position:Named
預設值:Operational System Account
必要:False
接受管線輸入:False
接受萬用字元:False

-SCOMCredential

指定連接到 Operations Manager 時要使用的認證。

類型:System.Management.Automation.PSCredential
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-SCSession

指定物件,表示 Service Manager 管理伺服器的會話。

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

-SyncNow

啟動 Operations Manager 警示連接器的同步處理。

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

-Template

指定當警示不符合規則時要使用的預設範本。

類型:Microsoft.EnterpriseManagement.Configuration.ManagementPackObjectTemplate
Position:Named
預設值:Operations Manager Incident Template
必要:False
接受管線輸入:False
接受萬用字元:False

-WhatIf

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

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

輸入

None.

您無法使用管線將輸入傳送至此 Cmdlet。

輸出

None.

此 Cmdlet 不會產生任何輸出。