Anda di halaman 1dari 4

SharePoint 2010: Provisioning a new Farm with Powershell

Posted by liquidpooled on May 17, 2010 Leave a comment (1) Go to comments SharePoint 2007 always required some level of scripting in its installation to allow for greater control of the installation process (i.e. creating database names without GUIDs). SharePoint 2010 is not any different in that scripting is still required to gain the finer control over installation. What has changed is that now PowerShell can be used in place of psconfig/stsadm. With that in mind, lets begin. 1. Install the SharePoint binaries on each server in your farm. Select Complete as the installation type. This will allow you to create a farm as opposed to a single server installation.After the install has completed, you will asked if you would like to complete the SharePoint Products Configuration Wizard. Do not run the wizard at this time. 2. On the server which you wish to provision Central Administration: 1. Open the SharePoint 2010 Management Shell (right-click and select Run as administrator). The shell will load with a message that the local farm is not accessible. This is expected as we have only installed the binaries. 2. Run the following command to create the initial configuration/content database for the farm. view source print?
New-SPConfigurationDatabase DatabaseName SharePoint2010_Config DatabaseServer SharePoint2010SQL AdministrationContentDatabaseName 1 SharePoint2010_Content_Admin Passphrase (ConvertToSecureString Pass@word1 AsPlaintext Force) FarmCredentials (Get-Credential)

3. After the initial creation of the farm, close and reload the SharePoint 2010 Management Shell. You should no longer receive any error messages. 4. Install the help files. view source print?
1 Install-SPHelpCollection -All

5. Secure the resources used by the server (files and registry).

view source print?


1 Initialize-SPResourceSecurity

6. Install and provision the farm services. view source print?


1 Install-SPService

7. Install the features on the server. view source print?


1 Install-SPFeature AllExistingFeatures

8. Provision Central Administration. view source print?


1 New-SPCentralAdministration -Port 1234 -WindowsAuthProvider "NTLM"

9. Install the application content. view source print?


1 Install-SPApplicationContent

10. Optional: Disable the loopback check. If this is a development install, outright disabling the check should be fine. For production environments, the loopback check should be left in place and BackConnectionHostNames should be used in its place. See KB 896861. view source print?
1 New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name "DisableLoopbackCheck" -value "1" -PropertyType dword

3. On each additional server that you wish to converge in the farm:

1. Open the SharePoint 2010 Management Shell (right-click and select Run as administrator). The shell will load with a message that the local farm is not accessible. This is expected as we have only installed the binaries. 2. Connect the server to the farm with the following command: view source print?
Connect-SPConfigurationDatabase -DatabaseName "SharePoint2010_Config" -DatabaseServer "SharePoint2010SQL" 1 -Passphrase (ConvertTo-SecureString "Pass@word1" -AsPlaintext -Force)

3. Install the help files. view source print?


1 Install-SPHelpCollection -All

4. Secure the resources used by the server (files and registry). view source print?
1 Initialize-SPResourceSecurity

5. Install and provision the farm services. view source print?


1 Install-SPService

6. Install the features on the server. view source print?


1 Install-SPFeature AllExistingFeatures

7. Install the application content. view source print?

1 Install-SPApplicationContent

8. Optional: Disable the loopback check. If this is a development install, outright disabling the check should be fine. For production environments, the loopback check should be left in place and BackConnectionHostNames should be used in its place. See KB 896861. view source print?
1 New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name "DisableLoopbackCheck" -value "1" -PropertyType dword

Anda mungkin juga menyukai