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:
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?
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:
$CN = $env:COMPUTERNAME
$path="\\MyServerSource\sp\AutoSPInstaller"
[xml] $xmlinput = (Get-Content " $path\AutoSPInstallerInput- $cn.xml") -replace ("localhost", $cn)
#Region Source External Functions
. " $path\AutoSPInstallerFunctions.ps1"
. " $path\AutoSPInstallerFunctionsCustom.ps1"
#EndRegion
#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?