문제

I have written a powershell script and it should work both in version 1 and version 2.

Can more than one powershell versions co-exist in a single machine ? Or should i have powershell versions in separate machine ?

도움이 되었습니까?

해결책

Well, the answer is yes and no.

Technically, on PowerShell 2.0 system, you can access PowerShell version 1.0 using

-version 1

parameter of powershell.exe

Similarly, on PowerShell 3.0 system, you can acccess PowerShell verison 2.0 using

-version 2

You cannot have both installed seperately on the same machine. PowerShell itself provides a way to go to the earlier version.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top