none
how check Powershell Version ?

    Question

  • Hi...all

    I installed SQL Server 2008 Dev edition on XP sp3.(It Installs WPS)

    I am very much new to PS..I started testing my Installation.

    For example, I typed Get-PS and press the Tab key , 
    the following cmdlets are appearing

    Get-PSDrive
    Get-PSProvider
    Get-PSSnapin

    But It suppose to show below list 

    ❑ Get-PSBreakpoint
    ❑ Get-PSCallStack
    ❑ Get-PSDrive
    ❑ Get-PSProvider
    ❑ Get-PSSession
    ❑ Get-PSSessionConfiguration
    ❑ Get-PSSnapin

    Why some other cmdlets are missing...Help me how to resolve and how check the Present version of WPS.

    Thanks in Advance




    SNIVAS
    Tuesday, December 15, 2009 3:13 PM

Answers

  • On Tue, 15-Dec-09 15:26:42 GMT, Karl Mitschke wrote:

    >To find the PowerShell version, in PowerShell, type the following command:Get-Host

    Actually - that's not quite right - Get-Host just shows you the
    version of the host (i.e. of Console.Exe). To see the version of
    PowerShell, use the built in variable: $PSVersionTable.


    Thomas

    Thomas Lee - doctordns@gmail.com
    Tuesday, December 22, 2009 6:41 PM
  • To find the PowerShell version, in PowerShell, type the following command:

    Get-Host

    Karl
    http://unlockpowershell.wordpress.com
    • Marked as answer by SNIVAS Tuesday, December 15, 2009 4:17 PM
    Tuesday, December 15, 2009 3:26 PM

All replies

  • To find the PowerShell version, in PowerShell, type the following command:

    Get-Host

    Karl
    http://unlockpowershell.wordpress.com
    • Marked as answer by SNIVAS Tuesday, December 15, 2009 4:17 PM
    Tuesday, December 15, 2009 3:26 PM
  • Thanks Karl

    here info

    Name             : ConsoleHost
    Version          : 1.0.0.0
    InstanceId       : 741ad976-f940-4df3-9d86-d8f0a01d7720
    UI               : System.Management.Automation.Internal.Host.InternalHostUserI
                       nterface
    CurrentCulture   : en-US
    CurrentUICulture : en-US
    PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy

    so that I need to Upgrade to 2.0...How to upgrade nay suggestions...?

    SNIVAS
    Tuesday, December 15, 2009 3:58 PM
  • Go here:

    http://support.microsoft.com/kb/968929

    Look for the section "Windows Management Framework Core (WinRM 2.0 and Windows PowerShell 2.0)" and download the version for XP.

    I’ve been asked, and I've seen the answer, but I cannot remember if you need to uninstall version 1 first.

    I'm tempted to say you don't

    Karl


    http://unlockpowershell.wordpress.com
    Tuesday, December 15, 2009 4:05 PM
  • On Tue, 15-Dec-09 15:26:42 GMT, Karl Mitschke wrote:

    >To find the PowerShell version, in PowerShell, type the following command:Get-Host

    Actually - that's not quite right - Get-Host just shows you the
    version of the host (i.e. of Console.Exe). To see the version of
    PowerShell, use the built in variable: $PSVersionTable.


    Thomas

    Thomas Lee - doctordns@gmail.com
    Tuesday, December 22, 2009 6:41 PM
  • I stand (well, sit) corrected :)

    Karl
    http://unlockpowershell.wordpress.com
    Tuesday, December 22, 2009 10:45 PM
  • Thomas,

    This was very helpful.  I was one of the folks who used to use Get-Host which worked fine until you try to run get-host from a remote session.

    -rm

    Monday, September 17, 2012 6:36 PM
  • I wish Thomas Lee was still participating here.
      - Larry
     
    On 9/17/2012 1:36 PM, Robert McDonnell wrote:
    > Thomas,
    >
    > This was very helpful. I was one of the folks who used to use Get-Host which worked fine until you
    > try to run get-host from a remote session.
    >
    > -rm
    >
     
     
    Monday, September 17, 2012 6:59 PM
  • You can also get the version in one line for a script like this:

    $host.version


    ---
    tompa
    http://tompaps.blogspot.com

    Friday, January 25, 2013 10:44 AM
  • I wish Thomas Lee was still participating here.
      - Larry
     

    I do Larry - from time to time. But I find the web so painful and slow to use I spend less time here than I used to spend in the old newsgroups. ANd sadly, Microsoft's latest OSs have killed my favourite NNTP client (it was IE based and they changed IE64 to the point where it broke Turnpike). OH well


    Thomas Lee <DoctorDNS@Gmail.Com>

    Friday, January 25, 2013 2:45 PM
  • You can also get the version in one line for a script like this:

    $host.version


    ---
    tompa
    http://tompaps.blogspot.com

    This ONLY gets the version of teh PowerShell Host, not the version of PowerShell itself. Use $psverstiontable variable instead!

    Thomas Lee <DoctorDNS@Gmail.Com>

    • Proposed as answer by Dipsu Saturday, September 07, 2013 11:42 AM
    Friday, January 25, 2013 2:46 PM
  • Hi Thomas,

    that variable is empty for me. But this one is always a good way to see what the version is :)

    (get-item C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe).versioninfo


    ---
    tompa
    http://tompaps.blogspot.com

    Friday, January 25, 2013 3:56 PM
  • if you are using Powershell 3.0 then you may also try using $pversiontable command.


    http://www.arabitpro.com

    Saturday, June 29, 2013 12:23 PM
  • PS C:\> $host.Version

    Major  Minor  Build  Revision
    -----  -----  -----  --------
    3      0      -1     -1

    Thanks, jeevan

    Monday, July 08, 2013 5:18 PM

  • (((gcm powershell).FileVersionInfo).FileVersion -split ' ')[0]

    on my workstations will produce

    6.1.7600.16385
    for PowerShell 2.0

    6.2.9200.16398
    for PowerShell 3.0

    • Proposed as answer by Daniel_Buzz Sunday, July 14, 2013 8:04 AM
    • Unproposed as answer by Daniel_Buzz Sunday, July 14, 2013 8:10 AM
    Monday, July 08, 2013 11:57 PM
  • Aaaaaargh! Does anyone else find it completely ridiculous that there are 50 different almost-answers on how to GET THE VERSION of PowerShell?! Just get the version.  Like "java -version", or "perl -version"...come on!

    • Edited by Daniel_Buzz Sunday, July 14, 2013 8:14 AM tone
    Sunday, July 14, 2013 8:07 AM
  • As posted higher up already: $psversiontable | Format-Table

    $psversiontable.version = 2.0

    on Windows 8 or server2012, you will see 3.0 :-) I just double-checked, Note that this is the default, while it is still possible to run posh V2 engine on systems where V3 is installed!


    (See http://stackoverflow.com/questions/1825585/how-to-determine-what-version-of-powershell-is-installed)
    • Edited by Conrad Braam Tuesday, September 10, 2013 5:18 PM
    Tuesday, September 10, 2013 5:16 PM
  • I get the same output whether I use $psversiontable or $psversiontable | Format-Table. What am I missing?

    Steve


    Wednesday, May 21, 2014 10:09 PM
  • Thanks for the blog link!
    Monday, August 18, 2014 5:07 PM
  • Why isn't there a simple alias for 'ver' like we used to have in DOS / Windows Command Prompt?
    Thursday, April 09, 2015 12:57 PM
  • Why isn't there a simple alias for 'ver' like we used to have in DOS / Windows Command Prompt?

    Just use tab completion.

    Type $psv and hit tab. Two extra keystrokes.


    Don't retire TechNet! - (Don't give up yet - 13,225+ strong and growing)

    Thursday, April 09, 2015 1:04 PM
  • Try:

    invoke-command -ComputerName comp1, comp2 {$PSVersiontable.PSVersion}

    response looks like this:


    Major  Minor  Build  Revision PSComputerName                                                                                       
    -----  -----  -----  -------- --------------                                                                                       
    3      0      -1     -1       srv-ad01                                                                                             
    4      0      -1     -1       srv-res01                                                                                            

    where Major is PowerShell version on remote machine.

    Friday, October 23, 2015 12:12 PM
  • We can get the installed Powershell Version in different ways. most easy ways are:

    1. $PSVersionTable

    2. Get-Host

    3. Using Registry

    The above three methods are explained with examples in the following article

    How to get the Version of PowerShell

    Monday, April 25, 2016 12:35 PM
  • We can get the installed Powershell Version in different ways. most easy ways are:

    1. $PSVersionTable

    2. Get-Host

    3. Using Registry

    The above three methods are explained with examples in the following article

    How to get the Version of PowerShell

    Did you even read the thread, Vijaya? If you did, you should know by now that you don't rely on Get-Host (or $Host) for the version of PowerShell. I won't speak on the registry, as I haven't looked into that option. This thread has existed for 7 years and the correct answer was included, and now you're telling people the wrong thing? Do this, use Enter-PSSession to connect a 2012 R2 server (it runs PowerShell 4.0 by default) and run (Get-Host).Version. It's going to say it's version 1. Read more here: http://tommymaynard.com/ql-get-the-version-of-powershell-not-its-host.

    Edit: Here's a picture using Invoke-Command, as opposed to Enter-PSSession:



    Monday, April 25, 2016 7:04 PM
  • yes, me :)

    and another ridiculous fact is that I have PS v2.0 and PS-host v2.0, but the folder is %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe

    Bah... 

    • Edited by pieropingi Sunday, July 17, 2016 4:34 PM
    Sunday, July 17, 2016 4:30 PM
  • The version number used in the path is the version of the PowerShell engine. It's still 1.0, even as the version of PowerShell has continued to increase.
    Sunday, July 17, 2016 5:15 PM
  • Hi, Try any of below to see powershell version as

    1. $PSVersionTable

    2. $Host

    3. Get-Host

    Regards

    Kam

    Monday, July 18, 2016 12:45 PM
  • Hi, Try any of below to see powershell version as

    1. $PSVersionTable

    2. $Host

    3. Get-Host

    Regards

    Kam

    Read the thread before adding this same post.

    Also - self proposing is annoying. Stop it.


    Monday, July 18, 2016 12:47 PM