I am quite new to Sharepoint and I have a question that has been bugging me for a few days now. I have a powershell script that is setting up some site collections in a Sharepoint webapplication I created. The following code should create a new content database with a given name. The content database is created, but it is not named the name I gave it. Instead it has given it a name with a guid.
Here is the code:
Write-Host "Create Content Database [" $groupDb "] for " $groupRootUrl
New-SPContentDatabase -Name $groupDb -WebApplication $applicationRootUrl -WarningSiteCount 50 -MaxSiteCount 75 | Out-Null
Write-Host "Database Created"
As I understand New-SPContentDatabase command, it will create a new database. If you specify the parameter -name it will name the new database that name. For example: WSS_Content_Group1. If you leave it out it will create a name something like: WSS_Content_459f1985-2d80-4cfb-a678-befa22348098
As you can note in the codesnippet above I write out the name of the database and it is the right name. So the -name parameter should get a correct value. How ever the database is still given a name with a guid. I have tried to change -name to -databaseName as I read some where, but with no success.
I have tried to Google it but have not found any answers. My setting is Windows Server 2008 R2 (fresh install) and Sharepoint Server 2010 standalone (also fresh install). All service packs and updates are installed. It is installed in a VMware Workstation machine. Sharepoint only contains the webapplication where I want to set up these site collections.
So to summarize: Why does New-SPContentdatabase create database with guid instead of the name I give it?
Any answers that you have will be highly appreciated!
Friendly greetings from Mattias!