When you develop with SharePoint you often have to set up development, build, qa environments, but wait – there is also production etc. All that takes time and SharePoint 2010 really stepped up in how you can quickly automate building of your environment.
You can start with abase machine installation: Windows, SQL etc. When you’re happy with configuration and and VM is all good to go – you can use the following steps to set up your SharePoint.
1. Copy SharePoint 2010 installation files to any directory accessible from your computer
(in my case: \Desktop\Sp2010Install)
2. Open the following file in the copied installation file structure:
Desktop\Sp2010Install\Files\SetupSilent\config.xml.
4. The contents will look like this:
<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” />
<Display Level=”none” CompletionNotice=”no” />
<Setting Id=”SERVERROLE” Value=”SINGLESERVER”/>
<Setting Id=”USINGUIINSTALLMODE” Value=”0″/>
<Setting Id=”SETUP_REBOOT” Value=”Never” />
<Setting Id=”SETUPTYPE” Value=”CLEAN_INSTALL”/>
</Configuration>
Here we have the value of the product key.
Also, we changed the value of SETUPTYPE to CLEAN_INSTALL to perform a clean install. If this is an upgrade – use V2V_INPLACE_UPGRADE
For more options available – check out config.xml reference (SharePoint Foundation 2010) at TechNet:
http://technet.microsoft.com/en-us/library/cc287749.aspx
5. Now create new file in the parent directory of your SP 2010 installation files folder called simplefarm.ps1
Replace the contents of the file with contents of the file as described on Technet (Quick start: Deploy single server in an isolated Hyper-V environment (SharePoint Server 2010)):
6. Replace the settings section values on the top of the simplefarm.ps1 file with the something that will match your silent install scenario, if you leave those as is – you will be prompted for installation parameters. In my case the info is as follows.
## This is the folder where installation files are $SetupPath = "C:\Users\MyUsername\Desktop\Sp2010Install" ## This command will prompt for the username and password $FarmCredential = Get-Credential "mydomain\yar"; ## Database server name - we assume you already have this set up $DBServer = "mydbservername" ## This is optional parameter - a farm name $FarmName = "SP2010" ## This is also optional parameter - the port of the central admin site $CAPort = "1111"
7. Run the simplefarm.ps1 file by right clicking and selecting Run with PowerShell.
8. If you get a OWSTIMER crash error – just click NO to debug option and your setup will continue.
Good Luck!
