SharePoint 2013 Databases without the GUID

2 minute read

When you configure SharePoint 2013 it will create the SharePoint_AdminContent database with a GUID at the end. To keep my database names clean I searched for a solution.

To be able to set the name of the database you will have to perform the configuration with PowerShell.

Take the following steps:

1. Open SharePoint 2013 Management Shell as Administrator.

2. Type the following:

New-SPConfigurationDatabase -DatabaseName BETA_SP2013_Config –AdministrationContentDatabaseName BETA_SP2013_AdminContent –DatabaseServer SP2013DB -FarmCredentials (get-credential)

3. You will get a pop-up to fill in the farm credentials. Fill in the account you want to use to run central administration under. When you filled in the account the management shell will also ask you to fill in the passphrase for joining servers to your farm.

4. Install the help collection files by running the following script.

Install-SPHelpCollection –All

5. Initialize the SharePoint Security by running the following script.


6. Register the SharePoint Services by running the following script.


7. Create central administration by running the following script.

New-SPCentralAdministration -Port 5555 -WindowsAuthProvider “ntlm”

8. Install the application content by running the following script.


9. When everything is done. You performed the steps the configuration wizard does for you. To be absolutely sure that everything is configured run the configuration wizard.


After these steps SharePoint is configured with a clean database name!

Almost all other SharePoint databases can be named trough the UI only the Search Service Application and the Usage service create there own databases. The solution is to also create these services  with PowerShell.

In other for you to create the Search Service Application you can use the script below (You only have to change the arguments on the top).

$databaseServer = "SP2013DB"
$ServiceAppPool = "SharePoint Services Application Pool"
$IndexLocation = "C:\SP2013_Search"
$SearchServiceApplicationName = "Search Service Application"
$server = "CLAY"

Write-Host "Setting up Search"

Start-SPEnterpriseSearchServiceInstance $server
Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance $server

$searchApp = New-SPEnterpriseSearchServiceApplication -Name $SearchServiceApplicationName -ApplicationPool $ServiceAppPool -DatabaseServer $databaseServer -DatabaseName "BETA_SP2013_Search"
$searchInstance = Get-SPEnterpriseSearchServiceInstance $server

$ssa = Get-SPEnterpriseSearchServiceApplication 

Write-Host "Setup Topology"
$clone = $ssa.ActiveTopology.Clone()

New-SPEnterpriseSearchAdminComponent –SearchTopology $clone -SearchServiceInstance $searchInstance
New-SPEnterpriseSearchContentProcessingComponent –SearchTopology $clone -SearchServiceInstance $searchInstance
New-SPEnterpriseSearchAnalyticsProcessingComponent –SearchTopology $clone -SearchServiceInstance $searchInstance 
New-SPEnterpriseSearchCrawlComponent –SearchTopology $clone -SearchServiceInstance $searchInstance 
New-SPEnterpriseSearchIndexComponent –SearchTopology $clone -SearchServiceInstance $searchInstance -RootDirectory $IndexLocation
New-SPEnterpriseSearchQueryProcessingComponent –SearchTopology $clone -SearchServiceInstance $searchInstance


$ssa | get-SPEnterpriseSearchAdministrationComponent |  set-SPEnterpriseSearchAdministrationComponent -SearchServiceInstance  $searchInstance

Write-Host "Setup Proxy"
$searchAppProxy = New-SPEnterpriseSearchServiceApplicationProxy -Name "$SearchServiceApplicationName Proxy" -SearchApplication $SearchServiceApplicationName > $null

Write-Host "Done"


You need to take the steps below to create the Usage Service Application:

1. Get the Usage Service.

$serviceInstance = Get-SPUsageService