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)
<Package Id=”sts”>
<Setting Id=”LAUNCHEDFROMSETUPSTS” Value=”Yes”/>

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

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

$config = “sharepointInstall_config.xml”
$bits = “e:”
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
  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

Request a Quote