Share via


Set-SPProjectOdataConfiguration

Sets the properties for how the OData service is configured for an instance of Project Web App.

Syntax

Default (Default)

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

Description

The Set-SPProjectOdataConfiguration cmdlet sets the settings for how the OData service is configured for an instance of Project Web App. It allows the user to configure the settings for a list of parameters that specify paging, the enabling of various querying functionality, whether MaxResultsPerCollection has been enabled and whether verbose errors are enabled. Paging can be specified per entity. If no paging overrides exist for a given entity, the DefaultMaxPageSize parameter is used. MaxResultsPerCollection cannot be used in conjunction with paging.

For permissions and the most current information about Windows PowerShell for Project Server, see the online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?LinkId=251833).

Examples

EXAMPLE 1

Set-SPProjectOdataConfiguration -ClearEntityPageSizeOverrides

This example clears any page size overrides that have been set for any specific entities.

EXAMPLE 2

Set-SPProjectOdataConfiguration -AcceptProjectionRequests $true

This example sets AcceptProjectionRequests to true.

EXAMPLE 3

Set-SPProjectOdataConfiguration -DefaultMaxPageSize 50

This example sets the default maximum page size to 50 rows.

EXAMPLE 4

Set-SPProjectOdataConfiguration -EntitySetName Assignments -PageSizeOverride 100

This example sets the page size override for the Assignments entity.

Parameters

-AcceptCountRequests

Applicable: Project Server 2013, Project Server 2016, Project Server 2019

Sets whether requests with the $count path segment or the $inlinecount query options are accepted.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AcceptProjectionRequests

Applicable: Project Server 2013, Project Server 2016, Project Server 2019

Sets whether projection requests should be accepted. Projection requests are made by using the $select query option.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AssignmentCollection

Applicable: Project Server 2013, Project Server 2016, Project Server 2019

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.

Parameter properties

Type:SPAssignmentCollection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-ClearEntityPageSizeOverrides

Applicable: Project Server 2013, Project Server 2016, Project Server 2019

Clears all page-size overrides that had been set for any entities.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultMaxPageSize

Applicable: Project Server 2013, Project Server 2016, Project Server 2019

Sets the default page size. This is used for any entities that do not have an override set using the PageSizeOverride parameter.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EntitySetName

Applicable: Project Server 2013, Project Server 2016, Project Server 2019

Specifies the entity name that is used to set a page size override with PageSizeOverride.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MaxResultsPerCollection

Applicable: Project Server 2013, Project Server 2016, Project Server 2019

Sets the integer value that indicates the maximum number of results per entity. This parameter cannot be used in conjunction with paging.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PageSizeOverride

Applicable: Project Server 2013, Project Server 2016, Project Server 2019

Overrides the page size that is used for a specific entity.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UseVerboseErrors

Applicable: Project Server 2013, Project Server 2016, Project Server 2019

Sets the service to use more verbose error messages (for example, stack trace).

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.