New-SPAccessServicesDatabaseServer

添加服务器以托管 Access Services 数据库。

语法

Default (默认值)

New-SPAccessServicesDatabaseServer
    [-ServiceContext] <SPServiceContextPipeBind>
    [-AssignmentCollection <SPAssignmentCollection>]
    [-AvailableForCreate <Boolean>]
    [-Confirm]
    [-DatabaseServerCredentials <PSCredential>]
    [-DatabaseServerGroupName <String>]
    -DatabaseServerName <String>
    [-Encrypt <Boolean>]
    [-Exclusive <Boolean>]
    [-SecondaryDatabaseServerName <String>]
    [-ServerReferenceId <Guid>]
    [-TrustServerCertificate <Boolean>]
    [-UserDomain <String>]
    [-ValidateServer <Boolean>]
    [-WhatIf]
    [-LoginType <LoginType>]
    [-State <DatabaseServerStates>]
    [-StateOwner <ServerStateOwner>]
    [<CommonParameters>]

说明

此 cmdlet 添加其他 Access Services 数据库服务器来托管 Access Services 数据库。

示例

示例 1

New-SPAccessServicesDatabaseServer -ServiceContext https://siteUrl -DatabaseServerName SQLSVR01 -ValidateServer:$true

此示例使用站点的上下文将名为 SQLSVR01 的SQL Server添加为 Access Services 数据库服务器,https://siteUrl. 这也验证SQLSVR01是否能够托管 Access Services 数据库。

参数

-AssignmentCollection

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

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

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

参数属性

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

参数集

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

-AvailableForCreate

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

指示SQL Server是否可用于创建 Access Services 数据库。 默认值为 true。

参数属性

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

参数集

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

-Confirm

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

提示你在运行 cmdlet 之前进行确认。

参数属性

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

参数集

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

-DatabaseServerCredentials

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

指定用于连接到SQL Server的凭据。

参数属性

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

参数集

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

-DatabaseServerGroupName

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

指定 Access Services 数据库组名称。 默认值为 DEFAULT。

参数属性

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

参数集

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

-DatabaseServerName

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

指定要添加的SQL Server的名称。

参数属性

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

参数集

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

-Encrypt

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

指定在 Access Services 与托管 Access Services 数据库的SQL Server之间使用 SSL 加密。

参数属性

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

参数集

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

-Exclusive

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

如果SQL Server将 AvaliableForCreate 设置为 False,则会将其更新为 True。 如果SQL Server ID 与数据库服务器 ID 不匹配,并且服务器将 AvailableForCreate 设置为 True,则将 AvailableForCreate 设置为 False。

参数属性

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

参数集

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

-LoginType

适用:SharePoint Server 2016,SharePoint Server 2019

指示登录类型。 有效值包含:

  • ApplicationLogin

  • LocalDBApplicationLogin

  • ServerLogin

  • StorageAccountLogon

  • WindowsAzureServerLogin

默认值为 ServerLogin。

参数属性

类型:LoginType
默认值:None
接受的值:ApplicationLogin, LocalDBApplicationLogin, ServerLogin, StorageAccountLogon, WindowsAzureServerLogin
支持通配符:False
不显示:False

参数集

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

-SecondaryDatabaseServerName

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

指定要与新SQL Server关联的辅助SQL Server。 这用于灾难恢复目的。

参数属性

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

参数集

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

-ServerReferenceId

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

提供特定的服务器引用 ID。默认情况下,添加SQL Server时自动生成服务器引用 ID。

参数属性

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

参数集

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

-ServiceContext

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

指定要从中检索 Access Services 信息的服务上下文。

参数属性

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

参数集

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

-State

适用:SharePoint Server 2016,SharePoint Server 2019

指示要添加的SQL Server的可用性。 有效值包含:

  • 活动

  • 已锁定

  • Reserved

默认值为 Active。

参数属性

类型:DatabaseServerStates
默认值:None
接受的值:Active, Locked, Reserved
支持通配符:False
不显示:False

参数集

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

-StateOwner

适用:SharePoint Server 2016,SharePoint Server 2019

指定状态所有者。 有效值包含:

  • NoOwner

  • TenantMove

默认值为 NoOwner。

参数属性

类型:ServerStateOwner
默认值:None
接受的值:NoOwner, TenantMove
支持通配符:False
不显示:False

参数集

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

-TrustServerCertificate

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

设置一个值,该值指示是否在绕过证书链以验证信任时加密通道。

参数属性

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

参数集

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

-UserDomain

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

指定要用于凭据的域。

参数属性

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

参数集

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

-ValidateServer

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

验证SQL Server是否处于托管 Access Services 数据库的受支持状态。

参数属性

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

参数集

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

-WhatIf

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

显示在 cmdlet 运行时发生的情况。 此 cmdlet 未运行。

参数属性

类型: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

输入

Microsoft.SharePoint.PowerShell.SPServiceContextPipeBind

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

输出

System.Object