Share via


AppFabric コマンドレットを使用してワークフロー ホスト管理を構成する

このトピックは、AppFabric Windows PowerShell コマンドレットを使用してホスト関連の機能を構成する方法を説明します。

コマンドレットを使用してインスタンス アップロード機能を構成するには

このセクションは、指定されたスコープに関連付けられた構成ファイルで、インスタンス アップロード機能に関連する構成要素および属性を AppFabric コマンドレットを使用して取得、設定、またはクリアする方法を説明します。インスタンス アップロード機能では、ワークフロー サービス インスタンスを永続化およびアップロードするかどうか、する場合はいつかを指定できます。

コマンドレット

[説明]

Get-ASInstanceUnloadPolicy

指定されたスコープに関連付けられている構成ファイル内の workflowIdle 要素の timeToUnload および timeToPersist 属性の値を取得します。

Set-ASInstanceUnloadPolicy

指定されたスコープに関連付けられている構成ファイル内の workflowIdle 要素の timeToUnload および timeToPersist 属性の値を設定します。workflowIdle 要素が存在しない場合は、コマンドレットがこの要素を追加して timeToUnload の値および timeToPersist 属性を要素に設定します。これら 2 つのパラメーターのうち 1 つのみを渡した場合は、もう 1 つのパラメーターに対応する属性は 00:00:00 に設定されます。

Clear-ASInstanceUnloadPolicy

指定されたスコープに関連付けられている構成ファイルから workflowIdle 要素を削除します。

Get-ASInstanceUnloadPolicy コマンドレットの構文オプション

// to get instance unload policy settings at the root level
Get-ASInstanceUnloadPolicy -Root

// to get instance unload policy settings at the Web site level
Get-ASInstanceUnloadPolicy -SiteName <String> 

// to get instance unload policy settings at the virtual application or service level that the VirtualPath points to 
Get-ASInstanceUnloadPolicy -SiteName <String> -VirtualPath <String>] 

// to get instance unload policy settings at the site, virtual application or service level that the Uri points to
Get- ASInstanceUnloadPolicy -Uri <Uri> 

// to get instance unload policy settings at the application level specified by the ApplicationObject.
Get-ASInstanceUnloadPolicy -ApplicationObject <ApplicationInfo> 
// Ex: Get-ASApplication -SiteName "Default Web Site" -VirtualPath /SampleApp | Get-ASInstanceUnloadPolicy

// to get instance unload policy settings at the service level specified by the Service Object
Get-ASInstanceUnloadPolicy -ServiceObject <ServiceInfo> 
// Ex: Get-ASApplicationService –SiteName “Default Web Site” –VirtualPath “/SampleApp/SampleService.xamlx” | Get-ASInstanceUnloadPolicy

Set-ASInstanceUnloadPolicy コマンドレットの構文オプション

Set-ASInstanceUnloadPolicy –Root –TimeToPersist <TimeSpan> -TimeToUnload <TimeSpan>

Set-ASInstanceUnloadPolicy -SiteName <String> –TimeToPersist <TimeSpan> -TimeToUnload <TimeSpan>

Set-ASInstanceUnloadPolicy -SiteName <String> -VirtualPath <string> –TimeToPersist <TimeSpan> -TimeToUnload <TimeSpan>

Set-ASInstanceUnloadPolicy –Uri <Uri> –TimeToPersist <TimeSpan> -TimeToUnload <TimeSpan>

Set-ASInstanceUnloadPolicy –ApplicationObject <ApplicationInfo> –TimeToPersist <TimeSpan> -TimeToUnload <TimeSpan>

Set-ASInstanceUnloadPolicy –ServiceObject <ServiceInfo> –TimeToPersist <TimeSpan> -TimeToUnload <TimeSpan>

Set-ASInstanceUnloadPolicy コマンドレットに固有のパラメーター

[パラメーター]

[説明]

TimeToUnload

インスタンスがアイドル状態になってからサービス ホストがワークフロー サービス インスタンスをアンロードするまで、サービス ホストが待機する必要のある時間を指定します。

TimeToPersist

インスタンスがアイドル状態になってからサービス ホストがワークフロー サービス インスタンスを永続化するまで、サービス ホストが待機する必要のある時間を指定します。

ヒント

変更するパラメーターのみを渡す必要があります。たとえば、timeToUnload 属性に値を設定する場合は、TimeToUnload パラメーターのみを渡します。

Clear-ASInstanceUnloadPolicy コマンドレットの構文オプション

Clear-ASInstanceUnloadPolicy -Root

Clear-ASInstanceUnloadPolicy -SiteName <String> 

Clear-ASInstanceUnloadPolicy -SiteName <String> -VirtualPath <String>] 

Clear- ASInstanceUnloadPolicy -Uri <Uri> 

Clear-ASInstanceUnloadPolicy -ApplicationObject <ApplicationInfo> 
// Ex: Get-ASApplication -SiteName "Default Web Site" -VirtualPath /SampleApp | Clear-ASInstanceUnloadPolicy

Clear-ASInstanceUnloadPolicy -ServiceObject <ServiceInfo> 
// Ex: Get-ASApplicationService –SiteName “Default Web Site” –VirtualPath “/SampleApp/SampleService.xamlx” | Clear-ASInstanceUnloadPolicy

コマンドレットを使用してインスタンス例外ポリシーを構成するには

次のコマンドレットを使用できます。

コマンドレット

[説明]

Get-ASInstanceExceptionPolicy

指定されたスコープに関連付けられている構成ファイルから workflowUnhandledExceptionaction 属性の値を取得します。

Set-ASInstanceExceptionPolicy

指定されたスコープに関連付けられている構成ファイルで workflowUnhandledExceptionaction 属性の値を設定します。要素が存在しない場合はコマンドレットがこれを作成してから、要素の action 属性を設定します。

Clear-ASInstanceExceptionPolicy

指定されたスコープに関連付けられている構成ファイルから workflowUnhandledException 要素を削除します。

Get-ASInstanceExceptionPolicy コマンドレットの構文オプション

// to get instance exception policy settings at the root level
Get-ASInstanceExceptionPolicy -Root

// to get instance exception policy settings at the Web site level
Get-ASInstanceExceptionPolicy -SiteName <String> 

// to get instance exception policy settings at the virtual application or service level that the VirtualPath points to 
Get-ASInstanceExceptionPolicy -SiteName <String> -VirtualPath <String>] 

// to get instance exception policy settings at the site, virtual application or service level that the Uri points to
Get-ASInstanceExceptionPolicy -Uri <Uri> 

// to get instance exception policy settings at the application level specified by the ApplicationObject.
Get-ASInstanceExceptionPolicy -ApplicationObject <ApplicationInfo> 
// Ex: Get-ASApplication -SiteName "Default Web Site" -VirtualPath /SampleApp | Get-ASInstanceExceptionPolicy

// to get instance exception policy settings at the service level specified by the Service Object
Get-ASInstanceExceptionPolicy -ServiceObject <ServiceInfo> 
// Ex: Get-ASApplicationService –SiteName “Default Web Site” –VirtualPath “/SampleApp/SampleService.xamlx” | Get-ASInstanceExceptionPolicy

警告

IIS マネージャーは、指定されたスコープに関連付けられている構成ファイル内に関連付けられた workflowUnhandledException 要素がない場合に、このフィールドの値として AbandonAndSuspend を表示します。ただし、指定されたスコープに関連付けられている構成ファイル内に workflowUnhandledException 要素がない場合は、このコマンドレットは値を返しません。

Set-ASInstanceExceptionPolicy コマンドレットの構文オプション

Set-ASInstanceExceptionPolicy –Root –Action {Abandon | AbandonAndSuspend | Cancel | Terminate}

Set-ASInstanceExceptionPolicy -SiteName <String> –Action {Abandon | AbandonAndSuspend | Cancel | Terminate}

Set-ASInstanceExceptionPolicy -SiteName <String> -VirtualPath <string> –Action {Abandon | AbandonAndSuspend | Cancel | Terminate}

Set-ASInstanceExceptionPolicy –Uri <Uri> –Action {Abandon | AbandonAndSuspend | Cancel | Terminate}

Set-ASInstanceExceptionPolicy –ApplicationObject <ApplicationInfo> –Action {Abandon | AbandonAndSuspend | Cancel | Terminate}

Set-ASInstanceExceptionPolicy –ServiceObject <ServiceInfo> –Action {Abandon | AbandonAndSuspend | Cancel | Terminate}

Set-ASInstanceExceptionPolicy コマンドレットに固有のパラメーター

[パラメーター]

[説明]

操作

実行しているワークフロー サービス インスタンスにハンドルされない例外が発生した場合にサービス ホストが実行する必要のあるアクションを指定します。

  • [破棄]。サービス ホストはメモリ内のワークフロー サービス インスタンスを中止します。データベース内のインスタンスの状態は "アクティブ" のままです。ワークフロー管理サービスは、永続化データベースに保存された最後の永続化ポイントから、破棄されたワークフロー サービス インスタンスを回復します。

  • [破棄と中断]。サービス ホストはメモリ内のワークフロー サービス インスタンスを中止し、永続化データベースでインスタンスの状態を "中断" に設定します。中断されたワークフロー サービス インスタンスは、後から IIS マネージャーを使用して再開または終了できます。これらのワークフロー サービス インスタンスは、ワークフロー管理サービスで自動的には回復されません。

  • [終了]。サービス ホストはメモリ内のワークフロー サービス インスタンスを中止し、永続化データベースでインスタンスの状態を "完了 (終了)" に設定します。終了したワークフロー サービス インスタンスを後から再開することはできません。

  • [キャンセル]。ワークフローを適切な方法で終了するようにすべてのキャンセル ハンドラーを起動することで、サービス ホストがワークフロー サービス インスタンスをキャンセルし、永続化データベース内のインスタンスの状態を "完了 (キャンセル)" に設定します。

Clear-ASInstanceExceptionPolicy コマンドレットの構文オプション

Clear-ASInstanceExceptionPolicy -Root

Clear-ASInstanceExceptionPolicy -SiteName <String> 

Clear-ASInstanceExceptionPolicy -SiteName <String> -VirtualPath <String>] 

Clear-ASInstanceExceptionPolicy -Uri <Uri> 

Clear-ASInstanceExceptionPolicy -ApplicationObject <ApplicationInfo> 

Clear-ASInstanceExceptionPolicy -ServiceObject <ServiceInfo> 

コマンドレットを使用してインスタンス管理ポリシーを構成するには

次のコマンドレットを使用できます。

コマンドレット

[説明]

Get-ASInstanceManagement

指定されたスコープに関連付けられている構成ファイルから workflowInstanceManagement 要素の authorizedWindowsGroup 属性の値を取得します。

Set-ASInstanceManagement

指定されたスコープに関連付けられている構成ファイルにおいて、workflowInstanceManagement 要素の authorizedWindowsGroup 属性の値を設定します。要素が存在しない場合はコマンドレットがこれを作成してから、要素の action 属性を設定します。

Clear-ASInstanceManagement

指定されたスコープに関連付けられている構成ファイルから workflowInstanceManagement 要素を削除します。コマンドレットは、構成ファイルへの <remove name="workflowInstanceManagement" /> の追加も行います。

Get-ASInstanceManagement コマンドレットの構文オプション

// to get instance management policy settings at the root level
Get-ASInstanceManagement -Root

// to get instance management policy settings at the Web site level
Get-ASInstanceManagement -SiteName <String> 

// to get instance management policy settings at the virtual application or service level that the VirtualPath points to 
Get-ASInstanceManagement -SiteName <String> -VirtualPath <String>] 

// to get instance management policy settings at the site, virtual application or service level that the Uri points to
Get-ASInstanceManagement -Uri <Uri> 

// to get instance management policy settings at the application level specified by the ApplicationObject.
Get-ASInstanceManagement -ApplicationObject <ApplicationInfo> 
// Ex: Get-ASApplication -SiteName "Default Web Site" -VirtualPath /SampleApp | Get-ASInstanceManagement

// to get instance management policy settings at the service level specified by the Service Object
Get-ASInstanceManagement -ServiceObject <ServiceInfo> 
// Ex: Get-ASApplicationService –SiteName “Default Web Site” –VirtualPath “/SampleApp/SampleService.xamlx” | Get-ASInstanceManagement

Set-ASInstanceManagement コマンドレットの構文オプション

Set-ASInstanceManagement –Root –AuthorizedWindowsGroup <String>}

Set-ASInstanceManagement -SiteName <String> –AuthorizedWindowsGroup <String>}

Set-ASInstanceManagement -SiteName <String> -Virtual Path <String> –AuthorizedWindowsGroup <String>}
Set-ASInstanceManagement -SiteName <String> -Virtual Path <String> –Root –EnableNetPipeProtocol
Set-ASInstanceManagement -SiteName <String> -Virtual Path <String> –AuthorizedWindowsGroup <String>} –Root –EnableNetPipeProtocol

Set-ASInstanceManagement –Uri <Uri> –AuthorizedWindowsGroup <String>}

Set-ASInstanceManagement –ApplicationObject <ApplicationInfo> –AuthorizedWindowsGroup <String>}

Set-ASInstanceManagement –ServiceObject <ServiceInfo> –AuthorizedWindowsGroup <String>}

Clear-ASInstanceManagement コマンドレットの構文オプション

Clear-ASInstanceManagement -Root

Clear-ASInstanceManagement -SiteName <String> 

Clear-ASInstanceManagement -SiteName <String> -VirtualPath <String>] 

Clear-ASInstanceManagement -Uri <Uri> 

Clear-ASInstanceManagement -ApplicationObject <ApplicationInfo> 

Clear-ASInstanceManagement -ServiceObject <ServiceInfo> 

  2012-03-05