Remove-SPRoutingRule

ルーティング ルールを削除します。

構文

Remove-SPRoutingRule
      [-Identity] <SPRoutingRulePipeBind>
      [-AssignmentCollection <SPAssignmentCollection>]
      [<CommonParameters>]

説明

コマンドレットは Remove-SPRoutingRule 、Identity パラメーターを使用してルーティング規則を削除します。 Identity パラメーターが指定されていない場合は、ファーム全体のルーティング ルールが削除されます。

Windows PowerShell for SharePoint 製品のアクセス許可と最新情報については、「SharePoint Server コマンドレット」のオンライン ドキュメントをご覧ください。

----------------------- 例 -----------------------------

$rm=Get-SPRequestManagementSettings -Identity $web
Get-SPRoutingRule -RequestManagementSettings $rm
$machines=Get-SPRoutingMachineInfo -RequestManagementSettings $rm
$pool=Add-SPRoutingMachinePool -RequestManagementSettings $rm -Name <Name of Pool> -MachineTargets $machines
$c=New-SPRequestManagementRuleCriteria -Value http -Property url -MatchType startswith -CaseSensitive $false
$rule=Add-SPRoutingRule -RequestManagementSettings $rm -Name <Rule Name> -Criteria $c -MachinePool $pool
Remove-SPRoutingRule -Identity $rule

この例では、 $rule 変数を使用して、指定した ID のルーティングを削除します。

パラメーター

-AssignmentCollection

適切な破棄を行うためにオブジェクトを管理します。 SPWeb や SPSite などのオブジェクトの使用によって大量のメモリが使用される場合があるので、Windows PowerShell スクリプトでこれらのオブジェクトを使用するには適切なメモリ管理が必要です。 メモリの解放が必要になった場合は、SPAssignment オブジェクトを使用して、変数へのオブジェクトの割り当てとオブジェクトの破棄を行うことができます。 割り当てコレクションまたは Global パラメーターが使用されていない場合、SPWeb、SPSite、または SPSiteAdministration オブジェクトが使用されていると、オブジェクトは自動的に破棄されます。

Global パラメーターが使用されている場合は、オブジェクトはすべてグローバル ストアに格納されます。 Stop-SPAssignment コマンドを使用してオブジェクトの使用または破棄を直接行わないと、メモリ不足のシナリオになる場合があります。

Type:SPAssignmentCollection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Identity

削除するルール オブジェクトを指定します。

Type:SPRoutingRulePipeBind
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition