Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

PowerShell – PowerShell Installed/Compatible Version

Posted on December 14, 2015 By David Kittell

Possibly one of my important commands is to find out what version I have available on the computer.

There are various ways to get this and some are rather long and arduous in comparison

clear

Write-Output "Get-Host (Really Only For 1.0, use once of the two below instead)"
     get-host | Format-Table name, version -AutoSize

Write-Output "`nPSVersionTable.PSVersion (If All you care about is the version)"
     $PSVersionTable.PSVersion

Write-Output "`nGet-PSVersion"
     function Get-PSVersion {
          if (test-path variable:psversiontable) {$psversiontable.psversion} else {[version]"1.0.0.0"}
     }
     Get-PSVersion

Write-Output "`nPSVersionTable"
     $PSVersionTable | format-table -AutoSize

Write-Output "`nPSVersionTable - Custom Hash Table"
     $system = @{
          "PS Version" = $PSVersionTable.PSVersion
          "PS Compatible Versions" = $PSVersionTable.PSCompatibleVersions
     }

     $system | format-table -AutoSize -HideTableHeaders

This will display something like this:

Get-Host (Really Only For 1.0, use once of the two below instead)
     Name                        Version
     ----                        -------
     Windows PowerShell ISE Host 4.0    

PSVersionTable.PSVersion (If All you care about is the version)
     Major Minor Build Revision
     ----- ----- ----- --------
     4     0     -1    -1      

Get-PSVersion
     4     0     -1    -1      

PSVersionTable
     Name                      Value               
     ----                      -----               
     PSVersion                 4.0                 
     WSManStackVersion         3.0                 
     SerializationVersion      1.1.0.1             
     CLRVersion                4.0.30319.42000     
     BuildVersion              6.3.9600.16406      
     PSCompatibleVersions      {1.0, 2.0, 3.0, 4.0}
     PSRemotingProtocolVersion 2.2                 

PSVersionTable - Custom Hash Table
     PS Version             4.0                 
     PS Compatible Versions {1.0, 2.0, 3.0, 4.0}
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code PowerShell

Post navigation

Previous post
Next post

Related Posts

Unix Shell – Set/Change IP

Posted on October 19, 2015October 19, 2015

By default UNIX computers/servers are setup with a DHCP/Dynamic IP address, below is how to change the IP to static Before you do either process understand what these settings should be: Network Interace you plan to modify (eth0, eth1, etc.) IP Address (address) Subnet Mask (netmask) Default Gateway (gateway) Whether…

Read More

Acrylic Proxy DNS Setup

Posted on October 16, 2015October 16, 2015

While still configuring my changes to Raspberry Pi Setup Proxy Server this works on an individual computer. NOTE: I have this setup mainly for the Wi-Fi, if you want it for wired connections you will need to change Wi-Fi to “Ethernet” or “Ethernet 2” Step 1: Download and Setup Acrylic…

Read More

Install SQL PowerShell Tools

Posted on October 14, 2015October 14, 2015

To install the 2014 PowerShell tools, the script below will help make it a bit easier. First all downloads are referenced from this URL (specific for SQL 2014) http://www.microsoft.com/en-ca/download/details.aspx?id=42295 I use Windows 64-Bit so if you use 32-Bit make sure you update your links # Microsoft® Windows PowerShell Extensions for…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes