Set-SPAccessServicesDatabaseServer

Sets parameters associated with a database server hosting Access Services databases.

Syntax

Set-SPAccessServicesDatabaseServer
   [-ServiceContext] <SPServiceContextPipeBind>
   [-AssignmentCollection <SPAssignmentCollection>]
   -AvailableForCreate <Boolean>
   [-Confirm]
   -DatabaseServer <AccessServicesDatabaseServerPipeBind>
   -DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind>
   [-Exclusive <Boolean>]
   [-WhatIf]
   [<CommonParameters>]
Set-SPAccessServicesDatabaseServer
   [-ServiceContext] <SPServiceContextPipeBind>
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   -DatabaseServer <AccessServicesDatabaseServerPipeBind>
   [-DatabaseServerCredentials <PSCredential>]
   -DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind>
   [-DatabaseServerName <String>]
   [-WhatIf]
   [<CommonParameters>]
Set-SPAccessServicesDatabaseServer
   [-ServiceContext] <SPServiceContextPipeBind>
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   -DatabaseServer <AccessServicesDatabaseServerPipeBind>
   -DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind>
   -Encrypt <Boolean>
   -TrustServerCertificate <Boolean>
   [-WhatIf]
   [<CommonParameters>]
Set-SPAccessServicesDatabaseServer
   [-ServiceContext] <SPServiceContextPipeBind>
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   -DatabaseServer <AccessServicesDatabaseServerPipeBind>
   -DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind>
   -Failover <Boolean>
   [-WhatIf]
   [<CommonParameters>]
Set-SPAccessServicesDatabaseServer
   [-ServiceContext] <SPServiceContextPipeBind>
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   -DatabaseServer <AccessServicesDatabaseServerPipeBind>
   -DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind>
   [-SecondaryDatabaseServerName <String>]
   [-WhatIf]
   [<CommonParameters>]
Set-SPAccessServicesDatabaseServer
   [-ServiceContext] <SPServiceContextPipeBind>
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   -DatabaseServer <AccessServicesDatabaseServerPipeBind>
   -DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind>
   -UserDomain <String>
   [-WhatIf]
   [<CommonParameters>]
Set-SPAccessServicesDatabaseServer
   [-ServiceContext] <SPServiceContextPipeBind>
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   -DatabaseServer <AccessServicesDatabaseServerPipeBind>
   -DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind>
   -State <DatabaseServerStates>
   -StateOwner <ServerStateOwner>
   [-WhatIf]
   [<CommonParameters>]

Description

Sets parameters associated with a database server hosting Access Services databases allowing you to control database creation, credentials, and failover database servers.

Examples

--------------------EXAMPLE---------------------

$site = (Get-SPWebApplication -IncludeCentralAdministration | ?{$_.IsAdministrationWebApplication -eq $true}).Sites[0]
$dbsvr = (Get-SPAccessServicesDatabaseServer -ServiceContext $site -DatabaseServerGroup DEFAULT)[0]
Set-SPAccessServicesDatabaseServer -ServiceContext $site -DatabaseServerGroup DEFAULT -DatabaseServer $dbsvr -Exclusive $true -AvailableForCreate $false

Sets the first database in the database server group named DEFAULT to exclusive mode and disallowing creation of new Access Services database on the selected database server.

Parameters

-AssignmentCollection

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
Required:False
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-AvailableForCreate

Indicates whether new Access Services databases can be created on the specified SQL Server.

Type:Boolean
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

-Confirm

Prompts you for confirmation before running the 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

-DatabaseServer

Specifies the SQL Server hosting Access Services databases.

Type:AccessServicesDatabaseServerPipeBind
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

-DatabaseServerCredentials

Specifies the Credential object for the database user. Use this parameter if you use SQL Server Authentication. If no database credentials are provided, Windows authentication is used.

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

-DatabaseServerGroup

The name of the Access Services database server group containing the SQL Server object to set.

Type:AccessServicesDatabaseServerGroupPipeBind
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

-DatabaseServerName

Specifies the database server hosting Access Services databases.

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

-Encrypt

Encrypts the database server connection.

Type:Boolean
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

-Exclusive

Sets the database server to exclusive mode. No further Access Services databases are allowed to be created on the database server.

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

-Failover

Enables or disables failover for the Access Services database server.

Type:Boolean
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

-SecondaryDatabaseServerName

Specifies the failover database server name.

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

-ServiceContext

Specifies the service context which is in the form of an instance of an SPServiceContext object, an SPSiteAdministration object identifier, or a SPSite object. An example of a service context value is an identifier from the ID field, a string identifier, a URI, or a string representation of a GUID.

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

Sets the database server state. Valid values:

  • Active

  • Locked

  • Reserved

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

-StateOwner

Sets the state owner.

Valid values:

  • NoOwner

  • TenantMove

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

-TrustServerCertificate

Sets a value that indicates whether the channel will be encrypted while bypassing walking the certificate chain to validate trust.

Type:Boolean
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

-UserDomain

Sets the user domain for the specified database 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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

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

Inputs

Microsoft.SharePoint.PowerShell.SPServiceContextPipeBind

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs

System.Object