New-SPConfigurationDatabase

Creates a new configuration database.

Syntax

New-SPConfigurationDatabase
   [-DatabaseName] <String>
   [-DatabaseServer] <String>
   [[-DirectoryDomain] <String>]
   [[-DirectoryOrganizationUnit] <String>]
   [[-AdministrationContentDatabaseName] <String>]
   [[-DatabaseCredentials] <PSCredential>]
   [-FarmCredentials] <PSCredential>
   [-Passphrase] <SecureString>
   [-SkipRegisterAsDistributedCacheHost]
   [-AssignmentCollection <SPAssignmentCollection>]
   [-DatabaseFailOverServer <String>]
   [-LocalServerRole <SPServerRole>]
   [-ServerRoleOptional]
   [<CommonParameters>]

Description

The New-SPConfigurationDatabase cmdlet creates a new configuration database on the specified database server. This is the central database for a new SharePoint farm.

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the online documentation at http://go.microsoft.com/fwlink/p/?LinkId=251831 (http://go.microsoft.com/fwlink/p/?LinkId=251831).

Examples

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

C:\PS>New-SPConfigurationDatabase -DatabaseName "SharePointConfigDB1" -DatabaseServer "SQL-01" -Passphrase (ConvertTo-SecureString "MyPassword" -AsPlainText -force) -FarmCredentials (Get-Credential)

This example prompts the user to provide user credentials for the default Farm Administrator account.

Required Parameters

-DatabaseName

Specifies the name of the new configuration database.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016
-DatabaseServer

Specifies the database server on which to create the configuration database. If no value is specified, the default value is used.

Type:String
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016
-FarmCredentials

Specifies credentials for the Farm Administrator account.

Type:PSCredential
Position:7
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016
-Passphrase

Specifies the secure password phrase for the new farm. This passphrase is used to join other machines to this farm.

Type:SecureString
Position:8
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016

Optional Parameters

-AdministrationContentDatabaseName

Specifies the name for the Central Administration content database for the new farm. If no name is specified, a default name is used.

Type:String
Position:5
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016
-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
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016
-DatabaseCredentials

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:6
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016
-DatabaseFailOverServer

{{Fill DatabaseFailOverServer Description}}

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
Applies to:SharePoint Server 2016
-DirectoryDomain

Specifies the directory domain for the new farm. If no domain is specified, the domain in which the local computer is located is used.

Type:String
Position:3
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016
-DirectoryOrganizationUnit

Specifies the directory organizational unit for the new configuration database. If no organizational unit is specified, the organizational unit in which the local computer is located is used.

Type:String
Position:4
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016
-LocalServerRole

{{Fill LocalServerRole Description}}

Type:SPServerRole
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2016
-ServerRoleOptional

{{Fill ServerRoleOptional Description}}

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2016
-SkipRegisterAsDistributedCacheHost

By default all the servers in the farm are registered as a cache host (that is, DistributedCacheService is running by default).

Use this parameter to not register the server computer as a distributed cache host. If you want to have a dedicated cache host, then use this parameter to make sure that caching service is not installed on the computer.

Type:SwitchParameter
Position:9
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016