How to switch from powershell v3 to v2 ?

Here is a new tip about switching over from PowerShell V2 to V3 and vice-versa:

PS console:
If i open a PowerShell V3 Console and run the below command it switches the powershell version to v2.

PS C:\Windows\system32> powershell.exe -v 2

And if i do the same thing vice-versa it switches again back to PowerShell V3.

PS C:\Windows\system32> powershell.exe -v 3

Tip: create a shortcut on your desktop with powershell -v2

I also confirmed the powershell version with PSVersion info in $PSVersionTable.

Using the #requires statement within PS script:

example: #Requires -version 2.0

http://technet.microsoft.com/en-us/library/hh847765(v=wps.620).aspx

Published by jdalbera

IT Pro: 28 years experience for large companies - Technical manager and solution architect: Directory services and Identity Managemen expert, Azure AD, Office 365, Azure infrastructures, Microsoft AD Security (ADDS,ADFS,ADCS), PowerShell, Quest solutions architect. Operating systems (Win/Lin). Unix and Microsoft interoperability. Data center Operations. Company integrations. Network architectures. Virtualization and storage infrastructures. HP/Dell servers deployments. Multiple certifications: Azure, MCSE, MCPs, MCITS, ITIL, VCP, CCNA, CyberArk

One thought on “How to switch from powershell v3 to v2 ?

Comments are closed.