how check Powershell Version ?
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 cmdletsare 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
December 15th, 2009 6:13pm
To find the PowerShell version, in PowerShell, type the following command:
Get-Host
Karl
December 15th, 2009 6:26pm
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...?
December 15th, 2009 6:58pm
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.
Ive 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
December 15th, 2009 7:05pm
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
December 22nd, 2009 9:41pm
I stand (well, sit) corrected :)
Karl
December 23rd, 2009 1:45am
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
September 17th, 2012 9:36pm
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
>
September 17th, 2012 9:59pm
You can also get the version in one line for a script like this:
$host.version
January 25th, 2013 1:44pm
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
January 25th, 2013 5:45pm
You can also get the version in one line for a script like this:
$host.version
January 25th, 2013 5:46pm
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
January 25th, 2013 6:56pm
if you are using Powershell 3.0 then you may also try using $pversiontable command.
June 29th, 2013 3:23pm
PS C:\> $host.Version
Major Minor Build Revision
----- ----- ----- --------
3 0 -1 -1
July 8th, 2013 5:18pm
(((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
July 8th, 2013 11:57pm
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
July 14th, 2013 8:07am
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
September 10th, 2013 5:16pm
I get the same output whether I use $psversiontable or $psversiontable | Format-Table. What am I missing?
Steve
May 21st, 2014 10:09pm
Thanks for the blog link!
August 18th, 2014 5:07pm
Why isn't there a simple alias for 'ver' like we used to have in DOS / Windows Command Prompt?
April 9th, 2015 9:00am
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.
April 9th, 2015 9:07am