Set-SPAccessServiceApplication

设置 SharePoint Server 中现有 Access Services 应用程序的全局属性。

语法

Default (默认值)

Set-SPAccessServiceApplication
    [-Identity] <SPAccessServiceApplicationPipeBind>
    [-AssignmentCollection <SPAssignmentCollection>]
    [-CacheTimeout <Int32>]
    [-ColumnsMax <Int32>]
    [-Confirm]
    [-NonRemotableQueriesAllowed]
    [-OrderByMax <Int32>]
    [-OuterJoinsAllowed]
    [-OutputCalculatedColumnsMax <Int32>]
    [-PrivateBytesMax <Int32>]
    [-RecordsInTableMax <Int32>]
    [-RequestDurationMax <Int32>]
    [-RowsMax <Int32>]
    [-SessionMemoryMax <Int32>]
    [-SessionsPerAnonymousUserMax <Int32>]
    [-SessionsPerUserMax <Int32>]
    [-SourcesMax <Int32>]
    [-TemplateSizeMax <Int32>]
    [-WhatIf]
    [-ApplicationLogSizeMax <Int32>]
    [<CommonParameters>]

说明

cmdlet Set-SPAccessServiceApplication 设置 SharePoint Server 中现有 Access Services 应用程序的全局运行时属性。 使用此 cmdlet 对属性所做的更改会影响运行此 Access Services 应用程序的场中的所有计算机。

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

示例

示例 1

Set-SPAccessServiceApplication -identity "MyAccessService" -RequestDurationMax 100

此示例将名为 MyAccessService 的 Access Services 应用程序设置为允许请求在超时前最长持续 100 秒。

示例 2

Get-SPAccessServiceApplication | Set-SPAccessServiceApplication -SessionsPerUserMax 5

此示例将场中的每个 Access Services 应用程序设置为允许每个用户在每台运行 Access Services 的后端应用程序服务器计算机上最多使用五个会话。

首先,检索每个 Access Services 应用程序,然后使用 cmdlet 设置 Set-SPAccessServiceApplication 一个新值。

示例 3

Get-SPAccessServiceApplication | where {$_.RowsMax -gt 50000 } | Set-SPAccessServiceApplication -RowsMax 50000

本示例设置场中的每个 Access Services 应用程序,该应用程序允许从查询返回或使用超过 50,000 行,然后将服务应用程序设置为最多仅允许 50,000 行。

首先,检索具有 50,000 行以上的每个 Access Services 应用程序,然后使用 cmdlet 设置 Set-SPAccessServiceApplication 新值。

参数

-ApplicationLogSizeMax

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

Access Services 应用程序日志列表中的最大记录数量。 有效值:-1 至 maxint。 值为零表示不允许任何记录。 默认值为 3000。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-AssignmentCollection

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

管理对象以便正确进行处理。 使用 SPWeb 或 SPSite 等对象可能会耗用大量内存,而且在 Windows PowerShell 脚本中使用这些对象需要正确管理内存。 通过使用 SPAssignment 对象,可以将对象分配给变量,然后在不需要这些对象时对它们进行处理,以释放内存。 在使用 SPWeb、SPSite 或 SPSiteAdministration 对象时,如果不使用分配集合或 Global 参数,则会自动处理这些对象。

使用全局参数时,所有对象均包含在全局存储中。 如果未立即使用对象,或未通过使用 Stop-SPAssignment 命令来处理对象,则可能会发生内存不足的情况。

参数属性

类型:SPAssignmentCollection
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

-CacheTimeout

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定数据缓存在没有用户活动的情况下在 Access Services 中保持活动状态的秒数。 有效值包括:-1(缓存永不超时)以及 1 到 2073600(缓存保持活动状态的时间为 1 秒到 24 天)。

键入的值必须为整数 -1,或介于 1 到 2073600(24 天)之间的某个整数。 默认值为 300。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ColumnsMax

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定查询中所涉及的列表或查询的输出可以包含的最大列数。 默认值为 30。

键入的值必须为 1 到 255 之间的整数。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Confirm

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

执行命令前,看到确认提示。 有关详细信息,请键入以下命令:get-help about_commonparameters

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:cf

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Identity

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定要更新的 Access Services 应用程序。

键入的值必须是有效的 Access Services 应用程序名称(例如 AccessSrvApp1);12345678-90ab-cdef-1234-567890bcdefgh 形式的有效 GUID 或有效 SPAccessServiceApplication 对象的实例。

参数属性

类型:SPAccessServiceApplicationPipeBind
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:1
必需:True
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

-NonRemotableQueriesAllowed

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定可以运行无法远程发送到数据库层的查询。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-OrderByMax

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定查询中 Order By 子句的最大数目。 默认值为 4。

键入的值必须为 1 到 8 之间的整数。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-OuterJoinsAllowed

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定支持左外部和右外部联接。 始终支持内联。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-OutputCalculatedColumnsMax

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定可作为查询的一部分包括在输出中的计算列的最大数量。 将不会包括基本 SharePoint 列表中的计算列。 默认值为 10。

键入的值必须为 1 到 32 之间的整数。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-PrivateBytesMax

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定 Access Services 可以使用的最大专用字节(以兆字节为单位)。 设置为 -1 时,它默认为计算机上的 75% 的物理内存。 有效值:-1,无限制,从 1 到任何正整数。默认值为 -1。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-RecordsInTableMax

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定 Access Services 应用程序中的表所允许的最大记录数。 有效值包括:-1(无限制)以及 1 到任何正整数。 默认值为 500000。

键入的值必须为整数 -1,或介于 1 到 MaxInt 之间的某个整数。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-RequestDurationMax

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定执行作的请求在请求超时之前可以使用的最大秒数。有效值包括:-1,无限制,1 到 2073600,缓存保持活动 1 秒到 24 天。 默认值为 30。

键入的值必须为整数 -1,或介于 1 到 2073600(24 天)之间的某个整数

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-RowsMax

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定查询中所涉及的列表或查询的输出可以包含的最大行数。 默认值为 50000。

键入的值必须为 1 到 200000 之间的整数。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-SessionMemoryMax

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定各个会话允许的最大大小(以 MB 为单位)。 有效值包括:0(禁用属性)以及 1 到 4095。 默认值为 64。

键入的值必须为整数 0,或介于 1 到 4095 之间的某个整数。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-SessionsPerAnonymousUserMax

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定每个用户的最大允许会话数。 如果达到此最大值,在启动新会话时,将会删除最旧的会话。 有效值包括:-1(无限制)以及 1 到任何正整数。 默认值为 10。

整数 -1 或介于 1 到 MaxInt 之间的某个整数

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-SessionsPerUserMax

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定每个用户的最大允许会话数。 如果达到此最大值,在启动新会话时,将会删除最旧的会话。 有效值包括:-1(无限制)以及 1 到任何正整数。 默认值为 10。

整数 -1 或者 1 到 MaxInt 之间的整数。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-SourcesMax

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定可以同时用作查询输入的最大列表数。 默认值为 8。

键入的值必须为 1 到 20 之间的整数。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-TemplateSizeMax

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

上载到解决方案库中的 Access 模板(.accdt 文件)的最大允许大小(以 MB 为单位)。 有效值包括:-1(无限制)以及 1 到任何正整数。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-WhatIf

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

显示一条描述命令作用的消息,而不执行命令。 有关详细信息,请键入以下命令:get-help about_commonparameters

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:无线

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters