Export (0) Print
Expand All
1 out of 3 rated this helpful - Rate this topic

Connect-SPConfigurationDatabase

Published: May 12, 2010

Connects the local server computer to a farm.

Connect-SPConfigurationDatabase [-DatabaseName] <String> [-Passphrase] <SecureString> -DatabaseServer <String> [-AssignmentCollection <SPAssignmentCollection>] [-DatabaseCredentials <PSCredential>]

Parameters

 

Parameter Required Type Description

DatabaseName

Required

System.String

Specifies the name of the configuration database to which to connect the server.

The type must be a valid database name; for example, DB1.

DatabaseServer

Required

A valid database server, such as "DS"

Specifies the server on which to create the configuration database. The default value is the local computer name.

Passphrase

Required

System.Security.SecureString

Specifies the secure password phrase for connecting the current server to the configuration database.

The type must be a valid secure string; for example, MyBDCApp1serverkey.

AssignmentCollection

Optional

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

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.

note Note:

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.

DatabaseCredentials

Optional

System.Management.Automation.PSCredential

Specifies the PSCredential object that contains the user name and password to be used for database SQL authentication. If this parameter is not specified, the current user is used.

The type must be a valid PSCredential object.

Detailed Description

The Connect-SPConfigurationDatabase cmdlet connects the current server to the specified configuration database.

Essentially, this cmdlet connects the server to the farm. If the current computer cannot be connected to a farm, the following error message is displayed:

"This machine is already connected to a SharePoint farm. See: Dismount-SPConfigurationDatabase"

Input Types

 

Return Types

 

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

Connect-SPConfigurationDatabase -DatabaseServer "ServerName\InstanceName" -DatabaseName "SharePointConfigurationDatabaseName" -Passphrase (ConvertTo-SecureString "MyP@ssw0rd" -AsPlainText -Force 

Start-Service SPTimerv4

This example joins the local server computer to a farm that is configured to use the database SharePointConfigurationDatabase on an instance of SQL Server by using the name ServerName\InstanceName with the passphrase MyP@ssw0rd.

Change History

 

Date Description Reason

May 12, 2010

Initial publication

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.