Skip Ribbon Commands
Skip to main content

Quick Launch

Todd Klindt's home page > Todd Klindt's Office 365 Admin Blog > Posts > How to create a SharePoint 2010 farm with no GUIDs using PowerShell
November 14
How to create a SharePoint 2010 farm with no GUIDs using PowerShell

In this blog post I show how to remove the GUID from the Central Admin content database. But that’s being reactive. All the cool kids know being proactive is where it’s at. So how do we create our SharePoint 2010 farm without that cursed database with a GUID in the first place? I’m glad you asked. That’s what this blog post is going to show you.

If your Central Admin content database has a GUID at the end, that means you used the Configuration Wizard (psconfigui.exe) to build your farm. There’s no shame in that at all, it’s how 90% of the SharePoint farms are built. Unfortunately it does create that one bad database. We can fix that though.

Like SharePoint 2007, all of the tasks that PSConfigUI.exe do can be replaced by various command line tools. In SharePoint 2010 we can do it all with PowerShell. First, we have to NOT run the Configuration Wizard after you install SharePoint. When you get to this screen, uncheck the box to run the Configuration Wizard and click “Close.”

SharePoint 2010 11-14-2010 3.55.57 PM

After the box has closed, open up the SharePoint Management Shell from the Start button.

SharePoint 2010 11-14-2010 7.14.55 PM

When it opens you’ll get an error like this:

SharePoint 2010 11-14-2010 7.17.33 PM

That’s completely expected, as there is no farm to access yet. No worries though, we’ll remedy that. We will run the commands below to build our farm. I’ll include the text for easier copying and pasting:

New-SPConfigurationDatabase -DatabaseName SharePoint_Config -DatabaseServer sharepoint -AdministrationContentDatabaseName SharePoint_Admin_Content

Install-SPHelpCollection -All

Initialize-SPResourceSecurity

Install-SPService

Install-SPFeature -AllExistingFeatures

New-SPCentralAdministration -Port 1026 -WindowsAuthProvider "NTLM"

Install-SPApplicationContent

Here’s what the first command looks like:

SharePoint 2010 11-14-2010 9.17.03 PM

The point of this blog post isn’t to automate the install, so I didn’t provide a couple of pieces of information. When you run the New-SPConfigurationDatabase cmdlet you’ll be prompted for the Farm account username and password as well as the farm passphrase. After you enter those, it will churn a bit and then you’re the proud owner of a new SharePoint farm. The cmdlet above creates a config db named “SharePoint_Config” on the database server “SharePoint.” It also creates the central admin content database and names it “SharePoint_Admin_Content” That’s the whole reason we did all this. If we create the farm with PSConfigUI it will generate an admin database with a GUID at the end. Creating the farm with PowerShell gets us around that.

At this point you have two options, you can continue to build your farm with the PowerShell commands above. The rest will run without any other intervention. Or, you can run PSConfigUI and finish up the machine configuration. Either way is fine and gets you the same GUIDless farm. The PowerShell cmdlets above will create Central Admin on port 1026 and set it to use NTLM.

tk

Comments

Nice

Awesome, and very timely post as I did not want to go through SPAutoInstaller's many config options yet. (I don't fully understand what each option is, so filling the blank is hard when my mind itself is blank. :)

Clarification: either run all the commands OR carry on with PSConfigUI (after the first command which creates the DBs), yes?

Also, worthwhile mentioning that on "resource challenged" boxes, that first command may take a LONG time, and sit there as if doing nothing. Resist the temptation to hit Ctrl-C or anything; the prompt WILL come back.
 on 11/15/2010 11:36 AM

Just shared this post with some of my fellow students

Todd,

I often read your stuff - never a waste of time. I'm in a beginning admin class over at USPJ and will use the above on my long road to understanding scripted installs.

Many thanks for this and other contributions. I hope that you dont mind I pointed others in this direction.
 on 11/15/2010 11:50 AM

Awesome

I was waiting for this.  Can't wait to try it.  Saw you do some of this at SP Connections and now I'm watching your blog for more gems.
 on 11/15/2010 1:07 PM

Error

I tried this as I hate the GUIDs as well but got this error:

requested registry access is not allowed

Any help with that would be appreciated.
 on 11/15/2010 7:10 PM

Re: Error

Run the SharePoint Management Shell as "Run as Administrator." You have to do that all the time to get anything done with SharePoint.

tk
Todd O. KlindtNo presence information on 11/15/2010 7:37 PM

Use the stsadm command just like 2007

I use the stsadm command to create the farm just like the in MOSS 2007.

stsadm -o -configdb -create -database SharePoint_Config -server db1 -user test\spfarm -password pass@word1 -passphrase pass@word1 -admincontentdatabase SharePoint_Admin_Content

Then you run the configuration wizard to create Central Admin.
 on 11/16/2010 9:58 AM

re: stsadm -o -configdb

stsadm does not have a configdb command. I think what you meant was 'psconfig -cmd -configdb...'
 on 11/22/2010 1:45 PM

All other database still have the GUID in the name

All the other service database created e.g. Excel, Search etc still have the GUID in the Database name. Is there any way around this as part of this process?
 on 11/24/2010 2:06 AM

Arggg

User access - off
Firewall - off
Farm account has DB create.

Why am I getting this after entering the farm paraphrase?

New-SPConfigurationDatabase : Cannot connect to database master at SQL server at sharepoint. The database might not exist, or the current user does not have permission to connect to it. At line:1 char:28+ New-SPConfigurationDatabase <<<<  -DatabaseName SharePoint_Config -DatabaseServer sharepoint -AdministrationContentDatabaseName SharePoint_Admin_Content + CategoryInfo: InvalidData: (Microsoft.Share...urationDatabase: SPCmdletNewSPConfigurationDatabase) [New-SPConfigurationDatabase], SPException + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSPConfigurationDatabase
 on 1/19/2011 3:08 PM

Arggg 2...

Nevermind! I am a dope. I never changed the server name! LOL!!!!
 on 1/19/2011 3:10 PM
1 - 10Next

Add Comment

Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.

Title


Body *


Today's date *

Select a date from the calendar.
Please enter today's date so I know you are a real person

Twitter


Want a message when I reply to your comment? Put your Twitter handle here.

Attachments

 

 SysKit