Set-SPProjectOdataConfiguration

设置有关如何为 Project Web App 实例配置 OData 服务的属性。

语法

Set-SPProjectOdataConfiguration
   [-AcceptCountRequests <Boolean>]
   [-AcceptProjectionRequests <Boolean>]
   [-AssignmentCollection <SPAssignmentCollection>]
   [-ClearEntityPageSizeOverrides]
   [-DefaultMaxPageSize <Int32>]
   [-EntitySetName <String>]
   [-MaxResultsPerCollection <Int32>]
   [-PageSizeOverride <Int32>]
   [-UseVerboseErrors <Boolean>]
   [<CommonParameters>]

说明

Set-SPProjectOdataConfiguration cmdlet 设置如何为Project Web App实例配置 OData 服务的设置。 它允许用户为指定分页、启用各种查询功能、是否启用 MaxResultsPerCollection 以及是否启用详细错误的参数列表配置设置。 可以为每个实体指定分页。 如果某给定实体不存在分页替代,则使用 DefaultMaxPageSize 参数。 MaxResultsPerCollection 不能与分页结合使用。

有关 Project Server Windows PowerShell的权限和最新信息,请参阅 (https://go.microsoft.com/fwlink/p/?LinkId=251833)的https://go.microsoft.com/fwlink/p/?LinkId=251833联机文档。

示例

--------------------示例 1-----------------------

Set-SPProjectOdataConfiguration -ClearEntityPageSizeOverrides

此示例清除曾经为任何特定实体设置的任何页面大小替代。

--------------------示例 2-----------------------

Set-SPProjectOdataConfiguration -AcceptProjectionRequests $true

此示例将 AcceptProjectionRequests 设置为 true。

--------------------示例 3-----------------------

Set-SPProjectOdataConfiguration -DefaultMaxPageSize 50

此示例将默认最大页面大小设置为 50 行。

----------------------EXAMPLE 4-----------------------

Set-SPProjectOdataConfiguration -EntitySetName Assignments -PageSizeOverride 100

此示例为 Assignments 实体设置页面大小替代。

参数

-AcceptCountRequests

设置是否接受带有 $count 路径片段或 $inlinecount 查询选项的请求。

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

-AcceptProjectionRequests

设置是否应接受投影请求。 可使用 $select 查询选项发出投影请求。

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

-ClearEntityPageSizeOverrides

清除曾经为任何实体设置的所有页面大小替代。

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

-DefaultMaxPageSize

设置默认页面大小。 这用于任何没有使用 PageSizeOverride 参数设置替代的实体。

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

-EntitySetName

指定用于使用 PageSizeOverride 设置页面大小替代的实体名称。

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

-MaxResultsPerCollection

设置指示每个实体最多结果数的整数值。 此参数不能与分页结合使用。

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

-PageSizeOverride

替代用于特定实体的页面大小。

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

-UseVerboseErrors

将服务设置为使用更详细的错误消息务(例如,堆栈跟踪)。

Type:Boolean
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