Tuesday, May 20, 2014

Using a specific version of PowerShell

If you inspect $PSVersionTable you'll see a few different versions of things being used with PowerShell in the current session, specifically look for $PSVersionTable.PSVersion. By default the most latest version will be used.

To launch a specific version of PowerShell you can pass the -version switch, e.g. for PowerShell v2:

c:\ powershell -version 2






No comments:

Post a Comment