I have PowerShell 3 installed and I need to run PowerShell 2 from Cygwin
$ PowerShell -Version 2
Windows PowerShell
Copyright (C) 2012 Microsoft Corporation. All rights reserved.
C:\Users\Michael> $host.Version
Major Minor Build Revision
----- ----- ----- --------
3 0 -1 -1
But, as you can see, PowerShell 3 still works.
Do you have any idea what I'm doing wrong?
If you're wondering why I need to run PowerShell from Cygwin, this is because of the git hooks I am writing. To develop server side hooks, I am writing a PowerShell script, and due to the problem described above, I cannot use my good trick with breakpoints
UPD: I am using Cygwin 1.7.11 terminal on Windows 8
UPD: I can even run cmd between them to make sure the parameters are passed correctly
$ cmd
Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.
C:\Users\Michael>PowerShell -Version 2
Windows PowerShell
Copyright (C) 2012 Microsoft Corporation. All rights reserved.
C:\Users\Michael> $host.Version
Major Minor Build Revision
----- ----- ----- --------
3 0 -1 -1
source
share