Set-SPRoutingRule

Cambia las propiedades de una regla de enrutamiento existente.

Syntax

Set-SPRoutingRule
   [-Identity] <SPRoutingRulePipeBind>
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Criteria <SPRequestManagementRuleCriteriaPipeBind[]>]
   [-ExecutionGroup <Int32>]
   [-Expiration <DateTime>]
   [-MachinePool <SPRoutingMachinePoolPipeBind>]
   [<CommonParameters>]

Description

Use el Set-SPRoutingRule cmdlet para cambiar las propiedades de una regla de enrutamiento existente.

Para obtener permisos y la información más reciente acerca de Windows PowerShell para Productos de SharePoint, vea la documentación en línea en Cmdlets de SharePoint Server.

Ejemplos

--------------------EJEMPLO---------------------

$wa = Get-SPWebApplication https://webAppUrl
$rm = Get-SPRequestManagementSettings -Identity $wa
Get-SPRoutingRule -RequestManagementSettings $rm
$machines = Get-SPRoutingMachineInfo -RequestManagementSettings $rm
$pool = Add-SPRoutingMachinePool -RequestManagementSettings $rm -Name <Name of Pool> -MachineTargets $machines
$criteria = New-SPRequestManagementRuleCriteria -Value http -Property url -MatchType startswith -CaseSensitive $false
$rule = Add-SPRoutingRule -RequestManagementSettings $rm -Name <Rule Name> -Criteria $c -MachinePool $pool
$criteriaNew = New-SPRequestManagementRuleCriteria -Property UserAgent -MatchType Equals -Value "Mozilla/4.0 (compatible; MSIE 4.01; Windows NT; MS Search 6.0 Robot)"
Set-SPRoutingRule -Identity $rule -Criteria $criteriaNew

En este ejemplo se usa la variable $rule para definir una regla de enrutamiento para la identidad especificada.

Parámetros

- AssignmentCollection

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

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

-Criteria

Especifica los criterios para que se cumpla la regla.

Type:SPRequestManagementRuleCriteriaPipeBind[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-ExecutionGroup

Especifica el grupo en que se colocará la regla.

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

-Expiration

Especifica la fecha y la hora de expiración de la regla.

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

-Identidad

Especifica el nombre del objeto de configuración de administración de solicitudes que se definirá.

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

-MachinePool

Especifica el grupo de máquinas al que se redirigirá una solicitud si se cumple la regla modificada.

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