Modify the Maximum Columns in a Query

Scenario/Problem: You need to modify the maximum amount of columns in a query.

Solution: Use the ColumnsMax parameter with the Set-SPAccessService Application cmdlet.

The ColumnsMax parameter has a default value of 40 and determines the maximum number of columns that can participate in a query and/or be contained in the output of a query. The valid range of values for this parameter is 1 to 255. Listing 23.3 shows a sample modification of the maximum number of columns.

Listing 23.3. Changing the Maximum Number of Columns

Set-SPAccessServiceApplication -Identity "Access Services"-ColumnsMax 20

Although you might need this to increase the number of columns allowed, queries typically perform better when ...

Get PowerShell™ for SharePoint® 2013 How-To now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.