3

Everytime I try to run a Enter-PSSession -ComputerName name, I am logged on to version 1.0 even tought 2.0 is installed.

Being the powershell newbie, I looked into the registry in HKLM\SOftWare\Microsoft\PowerShell\1\PowerShellEngine I see these registries

http://yfrog.com/gzo5s8j

Unfortunately I am unable to change it to syswow64 directory. Nor remove the 1.0 in compatability

Am I doing something wrong?

http://yfrog.com/kgyavsj

I just want is PSH v2 when I enter remotely (Enter-PSSession)

Any and all help is appreciated

3 Answers 3

7

You're getting PowerShell v2. v1 is incapable of accepting a remoting connection; therefore, if you're connected via remoting, it's v2.

It's also impossible to have both v1 and v2 installed side-by-side. When you install v2, it replaces v1.

What's probably confusing you is that both v1 and v2 of PowerShell use the v1.0 language engine. That's the reference to 1 that you're seeing.

Run Get-Host to see the actual version of PowerShell. Don't rely on registry entries, folder names, or other things.

1
  • Thanks for the swift response. But $host.version yields 1 0 0 -1 But A local powershell window yields 2 0 -1 -1
    – NItin
    Jun 20, 2011 at 0:10
5

Try $psversiontable -- this variable doesn't exist in V1, but will confirm for you that you're running V2.

I see the same behavior with $host.version, even when remoted into a 2008 R2 box, that can only have V2 installed. That must be the host version of the remoting endpoint. $psversiontable is your best way to determine your PS version.

2

Hi you might able to get the version with the following cmdlet

Get-Host

Work as well.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .