Set-SCSPFExtensibleEventHandler

Set-SCSPFExtensibleEventHandler

Sets an extensible event handler in Service Provider Foundation.

構文

Parameter Set: Default
Set-SCSPFExtensibleEventHandler -EventName <String> [-Enable] [-OrchestratorUri <String> ] [-RunbookPath <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

詳細説明

The Set-SCSPFExtensibleEvent cmdlet invokes a runbook in Service Provider Foundation to be run whenever a new virtual machine or new service is created. The virtual machine or service must be created by calls to Service Provider Foundation with the VMM Service. Service Provider Foundation raises internal events to invoke the runbook and the runbook will continue to be invoked continuously as long as the extensible event handler is enabled.

Service Provider Foundation will not invoke the runbook if the virtual machine or service was created by other means such as by using Windows PowerShell cmdlets or by using the console in System Center 2012 – Virtual Machine Manager (VMM).

To support the infrastructure for invoking a runbook, Service Provider Foundation calls the Start-SCOrchestratorRunbook cmdlet internally and it does to need to be explicitly called by the user.

パラメーター

-Enable

Indicates whether the the extensible event handler is enabled.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-EventName<String>

Specifies either VirtualMachineCreated or ServiceCreated for the event that invokes an Orchestrator runbook. These are the only permitted values for this parameter.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-OrchestratorUri<String>

Specifies the URI to the Orchestrator web service as specified in the web.config file at C:\Program Files (x86)\Microsoft System Center 2012\Orchestrator\Orchestration Console.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-RunbookPath<String>

Specifies the path to a runbook in Orchestrator.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Confirm

コマンドレットを実行する前に、ユーザーに確認を求めます。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-WhatIf

コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

Example 1: Set an event handler

This command enables the event handler to invoke a Runbook.

PS C:\> Set-SCSPFExtensibleEventHandler -EventName "VirtualMachineCreated" -OrchestratorUri "https://scxspf-ws8-24:82/Orchestrator2012/Orchestrator.svc" -RunbookPath "\SPF Runbooks\Extensibility\VM Created" -Enable

Example 2: Disable an event handler

This command disables the event handler from invoking a runbook because the Enable parameter is omitted.

PS C:\> Set-SCSPFExtensibleEventHandler -EventName "VirtualMachineCreated" -OrchestratorUri "" -RunbookPath ""

関連トピック

Service Provider Foundation Cmdlets