New-SPAccessServicesDatabaseServer

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

语法

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

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

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

Type:SPAssignmentCollection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-AvailableForCreate

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

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-Confirm

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

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-DatabaseServerCredentials

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

Type:PSCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-DatabaseServerGroupName

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

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-DatabaseServerName

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

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-Encrypt

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

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-Exclusive

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

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-LoginType

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

  • ApplicationLogin

  • LocalDBApplicationLogin

  • ServerLogin

  • StorageAccountLogon

  • WindowsAzureServerLogin

默认值为 ServerLogin。

Type:LoginType
Accepted values:ApplicationLogin, LocalDBApplicationLogin, ServerLogin, StorageAccountLogon, WindowsAzureServerLogin
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2016, SharePoint Server 2019

-SecondaryDatabaseServerName

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

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-ServerReferenceId

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

Type:Guid
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-ServiceContext

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

Type:SPServiceContextPipeBind
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-State

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

  • 活动

  • 已锁定

  • Reserved

默认值为 Active。

Type:DatabaseServerStates
Accepted values:Active, Locked, Reserved
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2016, SharePoint Server 2019

-StateOwner

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

  • NoOwner

  • TenantMove

默认值为 NoOwner。

Type:ServerStateOwner
Accepted values:NoOwner, TenantMove
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2016, SharePoint Server 2019

-TrustServerCertificate

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

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-UserDomain

指定要用于凭据的域。

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-ValidateServer

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

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

输入

Microsoft.SharePoint.PowerShell.SPServiceContextPipeBind

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

输出

System.Object