Configure a New SharePoint Farm


Scenario/Problem: You need to configure a new SharePoint farm from the command line.


Solution: Use the New-SharePointFarm cmdlet from the SPModule.

The New-SharePointFarm cmdlet enables you to configure a new SharePoint farm on the server. The syntax follows:

New-SharePointFarm -databaseserver <server name>
-databaseaccessaccount (Get-Credential <domainaccount>)
-farmname <name of new farm>
-passphrase (ConvertTo-SecureString -asplaintext -force -string "Enter a farm pass phrase here")

This command requires credentials for the database server. Therefore, the Get-Credential PowerShell command is used in conjunction with New-SharePointFarm. After you enter the command, PowerShell prompts you for the password of the database access account entered, as in Figure 3.2.

Image

Figure 3.2. Using Get-Credential prompts for the corresponding password.


Tip

Use inline credentials instead of (Get-Credential). See Chapter 2 for more details.


After you enter the credentials, the new farm is configured using the database server entered. This essentially creates the SharePoint_Config database and prepares the farm for use.


Note

The farm passphrase is a password that is used when you are adding new servers to the farm or making farm configuration changes. It needs to be entered into the cmdlet as a secure string; therefore, the ConvertTo-SecureString cmdlet is also used in conjunction with New_SharePointFarm.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.1.232