Description of the Windows Management Framework on Windows XP, Windows
Server 2003, Windows Vista, and Windows Server 2008
http://support.microsoft.com/kb/968929
==================================================================================================
I received this from Microsoft . I am using xp with powershell 1.0. and i
install the 32 bit package over my xp workstation.
Does it mean i m now on powershell 2.0 ?
Is there a way to determine powershell version from shell ?
help about_Windows_PowerShell_2.0
this should work, and the corresponding helpfile
$pshome\about_Windows_PowerShell_2.0.help.txt
should exist. Note that $pshome will still be
C:\WINDOWS\system32\WindowsPowerShell\v1.0
even though your are running 2.0.
[PS] $host.version
Major Minor Build Revision
----- ----- ----- --------
2 0 -1 -1
"IT Staff" wrote:
> .
>
If($PSVersionTable)
{
"v2 detected"
$PSVersionTable
}
else
{
"v1 detected"
}
---
Shay Levy
Windows PowerShell MVP
http://blogs.microsoft.co.il/blogs/ScriptFanatic
PowerShell Toolbar: http://tinyurl.com/PSToolbar
IS> Released on October 27th : Windows PowerShell 2.0 + WinRM 2.0 for
IS> XP and Server 2003
IS>
IS> Description of the Windows Management Framework on Windows XP,
IS> Windows Server 2003, Windows Vista, and Windows Server 2008
IS>
IS> http://support.microsoft.com/kb/968929
IS>
IS> ====================================================================
IS> ==============================
IS>
IS> I received this from Microsoft . I am using xp with powershell 1.0.
IS> and i install the 32 bit package over my xp workstation.
IS>
IS> Does it mean i m now on powershell 2.0 ?
IS>
IS> Is there a way to determine powershell version from shell ?
IS>
# If the $PSVersionTable variable doesn't exist, then you are running
V1.
# If it does exist, then the version will be available as
$PSVersionTable.PSVersion.
function Get-PSVersion {
if (test-path variable:psversiontable) {$psversiontable.psversion}
else {[version]"1.0.0.0"}
}
-aleksandar
http://powershellers.blogspot.com
On Nov 25, 10:53 am, Shay Levy [MVP] <n...@addre.ss> wrote:
> Check for the $PSVersionTable automatic variable. If it exists you're running
> v2.
>
> If($PSVersionTable)
> {
> "v2 detected"
> $PSVersionTable}
>
> else
> {
> "v1 detected"
>
> }
>
> ---
> Shay Levy
> Windows PowerShell MVPhttp://blogs.microsoft.co.il/blogs/ScriptFanatic