Set-SPRoutingMachineInfo

设置路由目标属性。

语法

Set-SPRoutingMachineInfo
   [-Identity] <SPRoutingMachineInfoPipeBind>
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Availability <SPRoutingMachineAvailability>]
   [-ClearOutgoingPort]
   [-OutgoingPort <Int32>]
   [-OutgoingScheme <SPRoutingOutgoingScheme>]
   [-StaticWeight <Double>]
   [<CommonParameters>]

说明

Set-SPRoutingMachineInfo使用 cmdlet 通过使用 Identity 参数设置路由目标属性。

有关适用于 SharePoint 产品的 Windows PowerShell 的权限和最新信息,请参阅 SharePoint Server cmdlet

示例

--------------------示例---------------------

$wa = Get-SPWebApplication -Identity https://webAppUrl
$rm = Get-SPRequestManagementSettings -Identity $wa
$m = Get-SPRoutingMachineInfo -RequestManagementSettings $rm -Name SP01
Set-SPRoutingMachineInfo -Identity $m -Availability Unavailable

此示例将指定标识的"可用性"路由目标属性设置为"不可用"。

参数

-Availability

指定所指定的计算机是否可用于路由。

有效值为:

--Available --Unavailable

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

-ClearOutgoingPort

如果设置此参数,则将清除传出端口。

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

-Identity

指定要设置的请求管理设置对象的名称。

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

-OutgoingPort

指定请求管理器进行传出连接所使用的端口。

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

-OutgoingScheme

确定传出连接的架构。

有效值为:

--SameAsIncoming --Http --Https

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

-StaticWeight

Specifies whether the static weight of a computer routing is used by Request Manager. If the static weight is higher, more requests will be routed to the computer.

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

-工作分配

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