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

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

参数

-AvailableForCreate

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

Type:Boolean
Position:Named
Default value:None
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
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
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
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
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
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
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
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
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
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
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
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
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2016, SharePoint Server 2019

-TrustServerCertificate

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

Type:Boolean
Position:Named
Default value:None
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
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
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
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016, SharePoint 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.

Type:SPAssignmentCollection
Position:Named
Default value:None
Accept pipeline input:True
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