by Oliver
30. May 2014 21:34
Today, I finally decided that I want to get to grips with PowerShell and have it available in my toolbox for those everyday developer tasks. For a fresh start, I wanted to make sure I'm running the latest and greatest of PowerShell, but how do I find out which version I have installed?
What version am I running?
Just fire up a PowerShell instance and type $psversiontable or $host.version:
PS C:\Windows\system32> $psversiontable
Name Value
---- -----
PSVersion 4.0
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.18444
BuildVersion 6.3.9600.16406
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion 2.2
PS C:\Windows\system32> $host.version
Major Minor Build Revision
----- ----- ----- --------
4 0 -1 -1
Actually, when I ran this I didn't have the 4.0 version installed yet. So where did I get it?
How to install Powershell 4.0 (the newest version as of mid 2014)?
Go here and choose the right link for you: How to Install Windows PowerShell 4.0. That's it.
Make use of great tooling: use the ISE
Last but not least, especially for those of you who like me are just getting started, make sure you're using the great Integrated Scripting Environment (ISE) that comes bundled with PowerShell:
Now, get scripting!