Install a service application without running the whole script

Mar 30, 2012 at 1:42 AM

Has anyone installed a service application without running the whole script? I am thinking about installing UPA but was wondering if I could just run the UPA portion of the script by extracting it to a seperate script file. Please advise?

Mar 30, 2012 at 10:41 PM

That is sort of difficult to do because the script has many dependencies to both independent script functions as well as assumptions that other functions have already run. In other words, the script is not designed to run without launching that entire script (again).

So you have a couple of options:

1. Write the script yourself, use this example: http://www.harbar.net/articles/sp2010ups2.aspx#ups5

2. Re-run the script, just change your XML file not to install any services except UPA. This is the easiest way.

3. Not really a good option but I've done it for other things; you can copy and paste the function that creates the UPA into a new file and run it this way. The problem with this is that because of all the dependencies, it gets too complex. For example, you'd also need to include the "ShoudIProvision, WriteLine, Pause" and other functions.

HTH

Coordinator
Mar 31, 2012 at 1:36 PM

I agree, #2 is probably the easiest way. A fourth option would be to simply dot-source AutoSPInstallerFunctions.ps1, import the content of your AutoSPInstallerInput.xml as $xmlinput (refer to AutoSPInstallerMain.ps1 for the syntax), and then call the UPA functions individually within your PowerShell console.

Brian