Home
Login
Register
Geek News
Statistics
59
posts
4
followers
0
comments
Followers
Latest posts
Trends
Trends this month
Trends history
Blog Style
How to Run PowerShell 2 and 3 Concurrently in Windows 8
Read 343 times.
Created
.
Windows 8 comes with a shiny new version of PowerShell, version 3. But while playing around with it, I have noticed a lot of scripts that I had written for version 2 are now throwing errors, so here’s how to get version 2 back while not losing version 3.
Launching PowerShell 3
Because it’s installed by default we don’t have to do anything special, just switch to the Start Screen and type
PowerShell
and hit enter. We can see our version by using the $PSVersionTable special variable.
[span style="width:674px;height:335px;"]
[/span]
Launching PowerShell 2
The awesome thing about Windows 8 is that Microsoft left the PowerShell 2 engine intact, that means we can easily access it. To get started create a new shortcut on your desktop.
[span style="width:674px;height:335px;"]
[/span]
The PowerShell directory has been pulled into our Path at system startup so we can reference the exe by name and pass it a version parameter, then click next.
Quote
PowerShell –Version 2
[span style="width:674px;height:335px;"]
[/span]
Name the shortcut PowerShell 2 and click finish.
[span style="width:674px;height:335px;"]
[/span]
If you double-click on your new shortcut and check the PowerShell version with $PSVersionTable, you will see that its now on version 2.
[span style="width:674px;height:335px;"]
[/span]
That’s all there is to it.
Source
howtogeek
Tags:
Windows 8
No comments
Add poll
Print
Tweet
Author
Comments:
To leave a comment, you must
be registered
. Just do it in a minute with your Facebook account.