Windows PowerShell commands (SharePoint Foundation 2010)
Applies to: SharePoint Foundation 2010
This article discusses the Windows PowerShell cmdlets that are needed to install Microsoft SharePoint Foundation 2010 on a stand-alone server or on a server farm.
In this article:
Installing SharePoint Products by using Windows PowerShell
Windows PowerShell installation commands
For information about the commands and syntax that are used in scripted deployment of a SharePoint Foundation 2010 farm, see Scripted deployment reference (SharePoint Foundation 2010).
Installing SharePoint Products by using Windows PowerShell
In SharePoint Foundation 2010, you can use Windows PowerShell cmdlets as an alternative interface to perform several operations that control how the SharePoint products are configured. Additionally, you can streamline deployment by using command-line installations in combination with other administrator tools to automate unattended installations.
You can run the Windows PowerShell cmdlets in the SharePoint 2010 Management Shell, or you can add the snap-in that contains the cmdlets. By using a management shell, you can eliminate the step to register the snap-in that contains the cmdlets by using the Add-PSSnapin cmdlet. For more information about how to use Windows PowerShell with Microsoft SharePoint 2010 Products, see SharePoint 2010 Products administration by using Windows PowerShell.
To use the cmdlets, verify that you meet the following minimum requirements: See Add-SPShellAdmin. For information about how to add a user to the SharePoint_Shell_Access role for the specified database, see Add-SPShellAdmin.
Note
When you create a new farm or join a server to a farm for the first time, ignore the following error message that appears: "The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered."
The cmdlets must be run in a specific order to run successfully. If you use SharePoint Products Configuration Wizard to configure the installation, it calls the commands (also known as configuration tasks) in the correct order for you. However, if you use cmdlets, you must ensure that you are performing the tasks in the correct order. The Windows PowerShell cmdlets must be performed in the following order:
New-SPConfigurationDatabase
Install-SPHelpCollection
Initialize-SPResourceSecurity
Install-SPService
Install-SPFeature
New-SPCentralAdministration
Install-SPApplicationContent
Start-Service
Note
Use a fresh Windows PowerShell process to perform operations on a new farm. For example, when you add a server to a new farm that was in a different farm, restart the Windows PowerShell process before you add the server to the new farm.
Windows PowerShell installation cmdlets
You can use the following Windows PowerShell cmdlets to install and configure SharePoint Foundation 2010.
Windows PowerShell cmdlet | Description |
---|---|
Creates a new configuration database on the specified database server. This is the central database for a new SharePoint farm. This command also creates the administration content database. |
|
Installs the Help site collection files for SharePoint 2010 Products in the current farm. You must specify the All parameter to install all Help Collection CABs under %Program Files%\Common Files\Microsoft Shared\Web Server Extensions\14\HCCab\<LCID> in the Help site collection. |
|
Enforces resource security on the local server. This cmdlet enforces security for all resources, including files, folders, and registry keys. |
|
Installs and optionally provisions services on a farm. This cmdlet installs all services, service instances, and service proxies that are specified in the registry on the local server computer. |
|
Installs a specific SharePoint feature by using the Feature.xml file. When you create a new farm, you must specify the AllExistingFeatures parameter to install all available features. |
|
Creates a new Central Administration Web application and starts the central administration service on the local computer. Central Administration is available only on computers where this service runs. |
|
Copies shared application data to existing Web application folders. |
See Also
Concepts
SharePoint 2010 Products administration by using Windows PowerShell