Friday, March 21, 2014

Using AutoSPInstaller for SharePoint Installations

 

If you want to automate your installations of SharePoint 2010 or SharePoint 2013, then you definitely want to take a look at AutoSPInstaller.  http://autospinstaller.codeplex.com/

AutoSPInstaller provides an XML Input File which you can use to set parameters for the installation and then proceeds to execute a set of PowerShell scripts to carry out the entire installation of either SharePoint 2010 or SharePoint 2013.

Normally, you would have to manually edit all the settings in the XML file using some type of text editor or an XML Editor, but fortunately, a 3rd party company has released a GUI interface for AutoSPInstaller (appropriately named AutoSPInstaller GUI) which provides an easy-to-use GUI interface for entering all of the various settings required in the AutoSPInstaller input XML file.  http://autospinstallergui.codeplex.com/

However, one of the major limitations or deficiencies in the input file and the GUI interface is to be able to specify a SINGLE DOMAIN for all of the domain user accounts that are needed to be set up for a SharePoint Farm.  Instead, one has to manually specify all of the various individual domain names for all of the user accounts that are used to setup the SharePoint Farm.

Well, fortunately, this can easily be rectified through use of a PowerShell script to perform a search and replace throughout the AutoSPInstaller input XML file.

Below is the contents of a sample script to replace the text “DOMAIN” throughout the entire XML file.

$filePath = "C:\AutoSPInstaller\AutoSPInstallerInput.xml"
$originalString = "DOMAIN"
$replacementString = "SPFARM"
 
(Get-Content $filePath) | Foreach-Object {$_ -replace $originalString, $replacementString} | 
Set-Content $filePath

No comments:

Post a Comment