Check Windows PowerShell Version and Architecture

Learn how to easily check the architecture and version of PowerShell.

John Savill

October 6, 2013

1 Min Read
Check Windows PowerShell Version and Architecture

Q: How can I quickly check the Windows PowerShell version and architecture of a PowerShell session?

A: I was recently speaking at an event, and I needed to quickly demonstrate differences between PowerShell versions and architectures when calling from different methods. The easiest way to show the PowerShell version and architecture I found was as follows:

$version = $PSVersiontable.PSVersion$arch = [intptr]::Size

The $version variable will contain the PowerShell version such as version 2.0 or 3.0. The $arch will have a value of 4 for 32-bit and 8 for 64-bit.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like