Tuesday, November 12, 2013

PowerShell - Finding the version of PowerShell you have

Just a quickie, when needing to know what version of PowerShell you are running many people use the following commands:

$host.version

or even just

$host

This is not reliable as it only reports the host version, not the engine. The correct command is:

$PSVersionTable.psversion

Cheers!

No comments:

Post a Comment