Batch Solution Deploy using PowerShell 3

Nowadays I’m working on a SharePoint deployment project using Advanced Installer, AutoSPInstaller and custom PowerShell scripts. One of that script deploys a set of solution packages in a given order. Order is important if you have dependencies between the solutions. So I defined  the name of the solutions and the order of them in a xml file. In this post I’d like to share that script and xml.

And the following xml is the configuration file of the deployment. It contains the packages to be deployed. Script will deploy them in the order of definition. I used WebApplication atrribute to specify if that solution will be deployed to a specific web application (url is set by powershell script parameter) or not.

Hope this helps in your deployment tasks…

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

3 thoughts on “Batch Solution Deploy using PowerShell

  • doaa

    Thanks for sharing. I would like to ask you for more details on how did you integrate the above code with Advanced installler. what you are doing here is exactlly what I want to accomplish with sharepoint and advanced installer. One more question , which licence of adanced installer are you using ?
    Thanks for you help in advance

    • Kerem Ozen Post author

      Let me briefly explain the steps. First of all, the setup of the sharepoint, office web apps (with prerequisites, service packs and hot fixes) is prepared by autospintall project. After that I wrote PowerShell scripts for the customizations on the SharePoint such as site coll. restores, solution deploys etc. At this point I have a bat file and a bunch of powershell scripts for SharePoint installation and my custom PowerShell scripts for the customizations. My purpose was to coordinate these seperate installation files into one msi package. So I used Advanced Installer to run these bat and ps1 files synchronously. We had some problems to run ps1 files via custom actions so we prepared a bat file for each ps1 file as a workaround and run that bat files as custom actions. Alternative paths can also be defined for upgrade or maintanance modes which I haven’t done yet. I hope these helps. Actually I’m planning to write a detailed post about the integration between Advanced Installer & AutoSPInstall with screenshots.

      • doaa

        Thanks for your reply Kerem.
        Actualy what I have now is a batch file for every powershell as you metioned above, I used them before to run it from command line for manual installation. The batch is only used to bring up the powershell script. I added powershell as a prerequisite, too in advanced installer.
        I added the batch file in a custom action and added both the batch and powershell as temproray fie in the windows temprory directory, it did bring up the powershell file but I still need to do some tweaking in the batch file to pass location of package “.wsp” and some parameter settings from the advanced installer.
        Thanks again for your help.