none
Need advice on script written in PS v.5 running on PS v.2 environment. RRS feed

  • Question

  • Hi,

    Am working on a task to be enabled such that a script runs whenever a server powers on, my concern is where will the script run at that moment? I feel it should run on the server itself, but I also observe the PS versions are all at 2 in them.

    So, is that our options will limited to whatever we have on PS  v.2 only?

    Also, the features that I expect to work on v.5, will it not work when script runs on v.2 environment??

    I am totally lost now!   Please advice..I would be grateful for an answer.

    Thanks in advance.
    Friday, May 5, 2017 3:49 AM

Answers

  • You cannot run scripts that use V5 features under V2.  Rewrite your scripts to be V2 compatible or upgrade you PowerShell.

    There is no other answer.


    \_(ツ)_/

    Friday, May 5, 2017 5:09 AM