This project has moved and is read-only. For the latest updates, please go here.

Re-Using AutoSPInstaller capabilities

Topics: Feedback, General Questions
Jul 31, 2014 at 7:22 PM
Edited Jul 31, 2014 at 7:25 PM
I found that I could very easily re-use the internal capabilities of ASPI by using the following process using the following to perform service creation of the Service Creation functions included in ASPI.

I keep copies of all of the XML files used for ASPI in the same location with ASPI Scripts

Create a PowerShell script like below:

[xml] $xmlinput = (Get-Content " $path\AutoSPInstallerInput- $cn.xml") -replace ("localhost",  $cn)

#Region Source External Functions
. " $path\AutoSPInstallerFunctions.ps1"
. " $path\AutoSPInstallerFunctionsCustom.ps1"

#Insert a command like the following below
ConfigureSandboxedCodeService $xmlinput
Run the PowerShell script and it will build the service exactly as configured in the XML File. If database specified in the XML input file already exists it will attach the database to the service when it creates it.

If you need to create a second instance of a service, you would need a copy of the XML input file and make appropriate changes to the script to read the secondary input file.

This compels me to keep the XML up to date with my configuration. It will still only create/Configure the services if it is specified to be installed in the input XML file.

Brian, what are your thoughts about this?
Jul 31, 2014 at 7:55 PM