PowerShell versions

I’ve been using the CIM cmdlets for a number of posts recently and had a comment that a reader got a message that Get-CimInstance didn’t exist on their Windows 7 machine. 

Windows 7 ships with PowerShell 2.0; Windows 8 with PowerShell 3.0 and Windows 8.1 with PowerShell 4.0.

You need PowerShell 3.0 or 4.0 to have the CIM cmdlets.

You can install PowerShell 3.0 or 4.0 on Windows 7.  You need to go to the Microsoft  download site,  download and install the appropriate version of Windows Management Framework (WMF 3 contains PowerShell 3.0 and WMF 4 contains PowerShell 4.0).

You can tell which version of PowerShell you are running by looking in the $psversiontable automatic variable:

£> $psversiontable

Name                           Value
—-                           —–
PSVersion                      4.0
WSManStackVersion              3.0
SerializationVersion           1.1.0.1
CLRVersion                     4.0.30319.34014
BuildVersion                   6.3.9600.16394
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion      2.2

About these ads
This entry was posted in PowerShell V3, PowerShell v4. Bookmark the permalink.

One Response to PowerShell versions

  1. cavallogolooso says:

    I think it could be me ;) But I had this when I wrote:
    PSVersion 4.0
    WSManStackVersion 3.0
    SerializationVersion 1.1.0.1
    CLRVersion 4.0.30319.18063
    BuildVersion 6.3.9600.16406
    PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}
    PSRemotingProtocolVersion 2.2

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