Powershell version loading on Windows 8.1 / 2012 R2

Yesterday, I used the new -Runasadministrator #requires statement and I failed to mention that it’s only available on Powershell version 4.0.

Today, I’ve tried to determine how bad I failed and actually learned something new.

I’ve got surprised by the fact that the PSversion is showing 4.0 although I launched Powershell using a specific version (3.0 in my case).

I did the same with version 2.0 and I got the following message that was expected.

I added the missing component with the following command:

Enable-WindowsOptionalFeature -Online -FeatureName 'NetFx3'

Now, version 2.0 is loaded

Why was powershell loading version 4.0 although I specified 3.0?

Well the answer can be found in the release notes of the preview

Advertisements

One thought on “Powershell version loading on Windows 8.1 / 2012 R2

  1. Pingback: Powershell 4.0 und 3.0 Versionsdurcheinander unter Windows 8.1 und Server 2012 R2 | Das nie endende Chaos!

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