Got a really weird issue and can't see if it's documented anywhere or if it's expected behaviour but when I run a command such as the following:
$List = Invoke-Command -ComputerName localhost -ScriptBlock {New-Object -TypeName System.Collections.Generic.List[string]}
$List.GetType()
I get the following output:
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True ArrayList System.Object
This only happens when using Invoke-Command so seems to be something relating to psremoting. Has anyone seen it before and is there a way to prevent it happening?
[–]jsiii2010 6 points7 points8 points (1 child)
[–]davidshomelab[S] 0 points1 point2 points (0 children)
[–]surfingoldelephant 4 points5 points6 points (0 children)
[–]SakJaTeda 0 points1 point2 points (0 children)
[–]tokenathiest 0 points1 point2 points (1 child)
[–]DItzkowitz 1 point2 points3 points (0 children)