popunder new

https://www.blogger.com/blog/posts/1739890295310631346

Tuesday, January 29, 2013

PowerShell 3 quick switch to PowerShell 2

PowerShell 3 improves on PowerShell 2 by adding almost 500 new cmdlets built-in.  One drawback unfortunately, is cmdlets or scripts written for version 2 do not always work as expected.

If you need to quickly switch to version 2 while you are in PowerShell 3 type the following.

 PowerShell.exe -version 2  
 
You will see the copyright info change to 2009 and if you type get-host it will display version 2.

image

To switch back to version 3 you can either  close and re-open PowerShell or simply type in your current session

 PowerShell.exe -version 3  
 

image

No comments:

Post a Comment