Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9067279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:54:04+00:00 2026-06-16T16:54:04+00:00

I have PowerShell 3 installed, and I need to run PowerShell 2 from Cygwin

  • 0

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 see it is still running PowerShell 3.

Do you have any ideas what am I doing wrong?

If you curious why I need to run PowerShell from Cygwin, it is because of the git hooks I am writing.
To develop server-side hooks I write PowerShell script, and because of the problem described above, I cannot use my nice trick with breakpoints

UPD: I am using Cygwin 1.7.11 terminal on Windows 8

UPD: I can even run cmd in between to make sure that parameters are passed properly

$ 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
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T16:54:05+00:00Added an answer on June 16, 2026 at 4:54 pm

    Works as expected for me.

    enter image description here

    You might have to give more context to see why this is not working. Only reason I can think of is somehow the -Version 2.0 param is not being passed to powershell.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Visual Studio 2012 premium and have NuGet package installed. From the
I have installed the release version of PowerShell v3 and am having some trouble
I have PowerShell v2.0 installed and on top of that, PSCX is installed. PSCX
I have installed TFS Power Tools and I am trying to use the powershell
Does PowerShell have an equivalent to this command construct from sh (and derivatives): $
I just installed new powershell 3 on my Windows 7 machine and than I
I need to enable two Windows Features using Powershell. But I don't know their
I have found a couple of examples showing how to run a PowerShell script
I want to try and work with Hadoop on Windows. I have installed the
I have a COM component and its PIA installed in the GAC. In PowerShell,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.