It seems when using environment variables [Enviornment]::GetEnvironmentVariable("ComputerName") inside a scriptblock returns the local PC computername not the remote environment variable.
I would have expected the local environment variable not the local variable.
It seems when using environment variables [Enviornment]::GetEnvironmentVariable("ComputerName") inside a scriptblock returns the local PC computername not the remote environment variable.
I would have expected the local environment variable not the local variable.