1 Reply Latest reply on Sep 26, 2013 11:36 PM by d_hristov

    Question about 5.5 - Invoke-VMscript and the release notes

    maishsk Expert

      In the Release notes it says

      • Invoke-VMScript
        When using Invoke-VMScript to invoke multi-line BAT and BASH scripts, the command might not run all the script lines.


      What exactly does this mean?


      Will it run the first 2?

      Last 2?

      Even lines?

      Odd lines?

      Just choose which some random lines?


      A clarification would be great!!

        • 1. Re: Question about 5.5 - Invoke-VMscript and the release notes
          Hot Shot

          Hi Maish,


          I apologize for the delayed response.

          What this means is that it will either run the whole script or just the first line. We haven't been able to work out exactly what causes this, but we believe it has something to do with the way we escape special symbols and redirect the output in the script before sending it to the guest OS. This is not a new issue for this release, but we decided to add it to the release notes. There are a couple of workarounds for this - 1) make the script single line; 2) save the script in a .bat file, upload it to the guest using Copy-VMGuestFile and execute the file using Invoke-VMScript.