5 Replies Latest reply on Nov 6, 2015 8:39 AM by sgnewman

    Run a powershell script before & after patching


      Hey All


      Quick question, is it possible to run a powershell script before patching a server, and then after the patch has completed, run another powershell script?  Also, I assume that you could use the machine variables when running this patch.


      Essentially, what I'd like to accomplish:

      1. Set a web application logically offline in a sql server database via the Invoke-SqlCmd (or rig up a web request to set a machine logically offline, if need be...)
      2. Patch the server
      3. Set the web application back online via the invoke-sqlcmd again


      This is probably really easy, I'm just really really unfamiliar with shavlik.