• No results found

The SPModule.zip file is a Windows PowerShell module written by members of the SharePoint Product Group that will install a SharePoint farm.

To use the SPModule.zip file, use the steps below:

1. Download the SPModule.zip and text file from the following Download Center page (http://go.microsoft.com/fwlink/?LinkId=187924).

2. Extract the files to a folder named SPModule and then add that folder to your environment path.

The PSModulePath environment variable is used to store paths to the locations of the modules that are installed on disk. To view paths specified in the PSModulePath variable, from a Windows PowerShell command prompt, type $env:PSModulePath. For more information, see PSModule Environment Variable (http://go.microsoft.com/fwlink/?LinkId=187757). After extraction, the SPModule folder should contain two files: SPModule.misc and SPModule.setup.

If the SPModule folder is not added to the PSModulePath variable, you must specify a full path to load the SPModule.

3. Decide on the type of signing to provide.

The downloaded files are unsigned. To provide self-signed scripts, see AllSigned: Signing Your PowerShell Scripts (http://go.microsoft.com/fwlink/?LinkId=187758).

By default, Windows PowerShell execution policy is set to Restricted so that no scripts can be run.

To change an execution policy, run the Set-ExecutionPolicy cmdlet. For additional information about execution polices, see About_Signing (http://go.microsoft.com/fwlink/?LinkId=187759).

1. Click Start, point to All Programs, and then click Windows PowerShell V2. Once the Windows PowerShell Command Prompt window opens, the first thing we need to do is add the path to the module to your Windows PowerShell module path (presuming you created a folder called "SPModule" on your server):

2. Right-click Windows PowerShell V2, and then click Run as administrator.

Note:

If you already have Microsoft SharePoint Server 2010 installed, you could open the SharePoint 2010 Management Shell instead.

3. Once the Command Prompt window is displayed, we need to import the module into the current Windows PowerShell session not adding it to a path by typing the following syntax from a Windows PowerShell command prompt:

Import-Module SPModule.misc Note:

Note:

Import-Module SPModule.setup

When you import the SPModule.misc module, you will invoke an update check. In version 1.0, this will check a text file to see if there is a newer version available. If you are notified that there is, you can go and download the newer version. Once the Import-Module commands have completed successfully, you are ready to use SPModule.

The following commands should only be used in the context of the SPModule and the process in this article.

1. Install-SharePoint: Installs all of the binary files for SharePoint Server 2010. For more information, see Scripted deployment reference (SharePoint Server 2010)

(http://technet.microsoft.com/library/7e1bffa2-bc8c-4522-b36f-7060722f9278(Office.14).aspx).

2. New-SharePointFarm: Creates a SharePoint farm and performs the following related tasks:

 Configures security

 Creates a shared service Web application that you can populate with service applications.

 Creates and configures the Central Administration Web site.

 Installs all of the product Help files.

 Installs all farm features.

For more information, see Scripted deployment reference (SharePoint Server 2010)

(http://technet.microsoft.com/library/7e1bffa2-bc8c-4522-b36f-7060722f9278(Office.14).aspx).

3. Join-SharePointFarm: Adds servers to the farm, and then configures them. For more information, see Scripted deployment reference (SharePoint Server 2010)

(http://technet.microsoft.com/library/7e1bffa2-bc8c-4522-b36f-7060722f9278(Office.14).aspx).

After Windows PowerShell version 2.0 is installed, you can use a new feature of Windows PowerShell called Remoting. By using the remoting feature and a couple lines of Windows PowerShell code, an administrator can remotely install multiple servers in a farm. For information about Remoting and SPModule, see Remote Install with SPModule (http://go.microsoft.com/fwlink/?LinkId=187923).

Install Microsoft SharePoint Server 2010 by running Install-SharePoint

After you have determined the required accounts for the installation, you can installSharePoint Server 2010. The product DVD contains examples of configuration (Config.xml) files. These example files are stored under the \Files folder in the root directory of the DVD, in folders that correspond to different scenarios. These example files are described in the following table.

Configuration file Description

Setup\Config.xml Stand-alone server installation, using Microsoft

SQL Server 2005 Express Edition

SetupFarm\Config.xml Server farm installation

SetupFarmSilent\Config.xml Server farm installation in silent mode Important:

SetupFarmUpgrade\Config.xml In-place upgrade of an existing farm

SetupSilent\Config.xml Stand-alone server installation, usingSQL Server 2005 Express Edition, in silent mode

SetupSingleUpgrade\Config.xml In-place upgrade of an existing single-server installation

1. On the drive on which the SharePoint Server 2010 product DVD is located, change to the root directory to locate the setup.exe file.

2. Run SPModule.Setup Install-SharePoint with the selected Config.xml file, as follows:

Install-SharePoint -SetupExePath<path and file name>-ConfigXmlPath<path and file name>

Note:

You can select one of the example files, or customize your own configuration file.

3. Press ENTER.

Setup is now finished.

The following example shows the configuration file for setting up a single server in silent mode (SetupSilent).

<Configuration>

<Package Id="sts">

<Setting Id="LAUNCHEDFROMSETUPSTS" Value="Yes" />

</Package>

<Package Id="spswfe">

<Setting Id="SETUPCALLED" Value="1" />

</Package>

<Logging Type="verbose" Path="%temp%" Template="SharePoint Server Setup(*).log" />

- <!--

<PIDKEY Value="Enter Product Key Here" />

-->

<Display Level="none" CompletionNotice="no" />

<Setting Id="SERVERROLE" Value="APPLICATION" />

<Setting Id="USINGUIINSTALLMODE" Value="0" />

<Setting Id="SETUP_REBOOT" Value="Never" />

<Setting Id="SETUPTYPE" Value="CLEAN_INSTALL" />

</Configuration>

To run Install-SharePoint with a Config.xml file at a Windows PowerShell command prompt

You can also customize your own configuration file. To control the installation, first edit the Config.xml file in a text editor to include the elements that you want with the appropriate settings for those elements. Next, run Install-SharePoint -SetupExePath -ConfigXMLPath to specify that Setup runs and uses the options that you set in the Config.xml file.

Some typical configuration options include the following:

 Bypassing the prompt for the product key by providing the key as a value, <PIDKEY Value="Enter PID Key Here" />, in the Config.xml file.

 Adding a location for a log file, <Logging Type="off" | "standard"(default) | "verbose"

Path="path" Template="file name.log"/>, which you can view if command-line installation fails.

Use a text editor, such as Notepad, to edit Config.xml. Do not use a general-purpose XML editor, such as Microsoft Office Word 2007. To validate that your XML file is well-formed, use any supported browser.

Related documents