Search

Session variables return inconsistent results by Kris Ganjam

Active

1
0
Sign in
to vote
Type: Bug
ID: 778933
Opened: 2/11/2013 2:48:11 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
When using a numeric session variable $v, $v.Length returns inconsistent results across remote machines.

Might have to do with different versions?

02:46:05 AM D:\KrisGan\xcgdev> icm -session $s -scriptblock { $env:computername; $psversiontable }
DMX-13

Name                         Value
----                         -----
PSRemotingProtocolVersion     2.1
BuildVersion                 6.1.7601.17514
PSCompatibleVersions         {1.0, 2.0}
PSVersion                     2.0
CLRVersion                     2.0.50727.5456
WSManStackVersion             2.0
SerializationVersion         1.1.0.1
DMX-26
PSRemotingProtocolVersion     2.2
BuildVersion                 6.2.9200.16398
PSCompatibleVersions         {1.0, 2.0, 3.0}
PSVersion                     3.0
CLRVersion                     4.0.30319.17929
WSManStackVersion             3.0
SerializationVersion         1.1.0.1
Details (expand)
How often does this happen?
Always Happens

Have you seen this problem before in this product?

I don't know if this issue existed previously
Reproduction Steps
$s = new-pssession -computername @(dmx-13, dmx-26)

icm -session $s -scriptblock { $zz = "123" }
icm -session $s -scriptblock { "$env:computername {0}" -f $zz.length }

DMX-26 3
DMX-13 3

icm -session $s -scriptblock { $zz = 123 }
icm -session $s -scriptblock { "$env:computername {0}" -f $zz.length }
DMX-13
DMX-26 1
Expected Results
$s = new-pssession -computername @(dmx-13, dmx-26)

icm -session $s -scriptblock { $zz = "123" }
icm -session $s -scriptblock { "$env:computername {0}" -f $zz.length }

DMX-26 3
DMX-13 3

icm -session $s -scriptblock { $zz = 123 }
icm -session $s -scriptblock { "$env:computername {0}" -f $zz.length }
DMX-13 1
DMX-26 1
File Attachments
0 attachments
Sign in to post a comment.
Sign in to post a workaround.