How to check Powershell Version

Installing via script “Windows Backup” feature, I discover that command is different from Windows 2008R2 and Windows 2012R2.

(Get-Host).Version are not reliable; they reflect the version of the host only, not the engine. And on a powershell remote session the value is 1.

Use this instead:

$PSVersionTable.PSVersion
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s