x

Agile Insider Blog

Unattended SharePoint 2010 Install with PowerShell

Eric Kraus points out this great nugget of how to create a unattended install of SharePoint 2010

1.  Create an XML file that looks like this.  This will do a Full Farm Install (quietly).  For other config files, check out  e:FilesSetupFarmSilentconfig.xml  (e: is the drive with SharePoint on it)
sharepointInstall_config.xml
———————————————-
<Configuration>
<Package Id=”sts”>
<Setting Id=”LAUNCHEDFROMSETUPSTS” Value=”Yes”/>
</Package>

    <Package Id=”spswfe”>
<Setting Id=”SETUPCALLED” Value=”1″/>
<Setting Id=”OFFICESERVERPREMIUM” Value=”1″ />
</Package>

    <Logging Type=”verbose” Path=”%temp%” Template=”SharePoint Server Setup(*).log”/>
<PIDKEY Value=”USE_YOUR_KEY_HERE” />
<Setting Id=”SERVERROLE” Value=”APPLICATION”/>
<Setting Id=”USINGUIINSTALLMODE” Value=”1″/>
<Setting Id=”SETUP_REBOOT” Value=”Never” />
<Setting Id=”SETUPTYPE” Value=”CLEAN_INSTALL”/>
<INSTALLLOCATION Value=”c:Program FilesMicrosoft SharePoint” />
<Display Level=”Basic” CompletionNotice=”Yes” AcceptEULA=”Yes” />
</Configuration>
2.  Next create a PowerShell script, that looks like this  (save it to the same folder as the XML file above):

Install-SharePoint.ps1
—————————————————-
$config = “sharepointInstall_config.xml”
$bits = “e:”
cls
Write-Progress -Activity “Installing SharePoint Quietly” -Status “Copying config file locally”
Copy-Item $config -Destination $bits
Write-Progress -Activity “Installing SharePoint Quietly” -Status “Installing SharePoint”
cmd.exe /C “$bitssetup.exe /config $config”
3.  Now run your script from PowerShell, with the the working directory set to the location of your script files:
PS C:>  cd sharepointScript
PS C:sharepointScript> .Install-SharePoint.ps1
4.  Wait a few minutes and the install will complete quietly.
5.  Proceed to provisioning the farm with PowerShell, here
Note:
  Don’t forget to set your execution policy in PowerShell to allow the script to run.  Easiest (but least secure):  Set-ExecutionPolicy Unrestricted

Read the complete article @> Eric Kraus’ SharePoint/.NET Blog : Automated SharePoint 2010 Install with PowerShell

Leave a comment

Learn More Today

Have questions or want to learn more about the services and solutions Agile IT has to offer?

Schedule a call with us today!

Schedule a Call
or

Request a Quote