6 Replies Latest reply on Aug 17, 2015 2:10 AM by STEFANO BRUTTO

    Bladelogic 8.7 Powershell?


      Hi All,


      do you know if BSA's 8.7 version will integrate powershell scripting/interface inside depot without actual limitations (like with 8.5)?


      This request is also related to Tim Bolton's suggestion (@Run Powershell natively in Bladelogic)



        • 1. Re: Bladelogic 8.7 Powershell?
          Steffen Kreis



          we are participating in the 8.7 BETA and unfortunately there are no changes around Powershell in there.

          I already raised this with Neil Karani during the BETA calls, as we really really require that feature as well.


          What's your view on this ?

          From my perspective the Type-3 Scripting-Job simply should allow to specify the interpreter that is used to run the given script.


          In this way we can use the same type of job for PowerShell, VBS, Perl, Python etc etc etc.



          • 2. Re: Bladelogic 8.7 Powershell?
            Yanick Girouard

            Ideally, the best method to do this generically (IMO), would be to have a type of NSH script (type 5), that would require a command-line to be specified. The command line would support special variables like %s (for script name) and possibly others if it fits, as well as the working directory to run the script from (-D //target/working/dir would be used to call nexec)


            The app server would then copy the script to a temporary file like it does now, and use nexec to execute the remote command with the %s parameter to specify the name of the script, followed by all other parameters.


            For example:


            Command-line: cmd /c powershell -noninteractive -noprofile -command .\\%s

            Working directory: ??TARGET.STAGING_DIR??


            Let's say the script has a parameter with a flag named -param1, it would call the whole thing like this:


            nexec -D //target/path/to/staging/dir cmd /c powershell -noninteractive -noprofile .\\temp_name_of_script_copied_to_target -param1 "value of param 1"

            • 3. Re: Bladelogic 8.7 Powershell?
              Steffen Kreis
              And than imagine you could run that as a Remediation action to a Compliance Rule.... 
              • 4. Re: Bladelogic 8.7 Powershell?
                STEFANO BRUTTO

                Yes..  is correct your proposal (Type-3 Scripting-Job) currently i use it several times.. for both Vbs and for powershell...  but for me it would be the best write directly powershell code in depot interface ... (in Type 1 or Type3) without interpreter ...  as now we use nsh.... currently (for me) BladeLogic is more powerful unix side (for scripting) and bringing powershell in BladeLogic restores balance...

                • 5. Re: Bladelogic 8.7 Powershell?
                  Steffen Kreis

                  that is exactly what the suggestion is about. 

                  - Have a generic Script Job option 
                  - Place the script content of whatever language you fancy directly in the depot (with script highlight features of the most common ones) 
                  - Decide how this script gets executed by specifying the commadline that runs the script

                  • 6. Re: Bladelogic 8.7 Powershell?
                    STEFANO BRUTTO

                    development side should not be particularly onerous... we hope it arrive in 8.8...