Share via


SPFarm.Create method (SqlConnectionStringBuilder, SqlConnectionStringBuilder, String, SecureString)

NOTE: This API is now obsolete.

Creates a server farm and its associated configuration database based on the specified content database, user, and password.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
<ObsoleteAttribute("Use the SPFarm.Create method that takes a passphrase.",  _
    False)> _
Public Shared Function Create ( _
    configurationDatabase As SqlConnectionStringBuilder, _
    administrationContentDatabase As SqlConnectionStringBuilder, _
    farmUser As String, _
    farmPassword As SecureString _
) As SPFarm
'Usage
Dim configurationDatabase As SqlConnectionStringBuilder
Dim administrationContentDatabase As SqlConnectionStringBuilder
Dim farmUser As String
Dim farmPassword As SecureString
Dim returnValue As SPFarm

returnValue = SPFarm.Create(configurationDatabase, _
    administrationContentDatabase, _
    farmUser, farmPassword)
[ObsoleteAttribute("Use the SPFarm.Create method that takes a passphrase.", 
    false)]
public static SPFarm Create(
    SqlConnectionStringBuilder configurationDatabase,
    SqlConnectionStringBuilder administrationContentDatabase,
    string farmUser,
    SecureString farmPassword
)

Parameters

  • farmUser
    Type: System.String

    A String object that contains the user name for the server farm account that is used for the administrative site application pool and timer service.

  • farmPassword
    Type: System.Security.SecureString

    A SecureString object that contains the password for the server farm account that is used for the administrative site application pool and timer service. The text is encrypted for privacy when it is used, and deleted from computer memory when it is no longer needed.

Return value

Type: Microsoft.SharePoint.Administration.SPFarm
An SPFarm object that represents the new server farm.

Remarks

The username and password that you provide must be associated with a domain account.

See also

Reference

SPFarm class

SPFarm members

Create overload

Microsoft.SharePoint.Administration namespace