Closed bklockwood closed 8 years ago
This is blocking forward progress, and baking my noodle.
I place the following function on t7 (a Win7/PS v2 system):
function test-remoteicm { [CmdletBinding()] Param () $true write-output "hello" }
I run it from a win8.1 or win10 machine thusly:
PS> icm t7 {import-module pswu;test-remoteicm} PS> icm t7 {import-module pswu;test-remoteicm;$null} True hello PS> icm t7 {$null;import-module pswu;test-remoteicm} True hello PS>
There's no output on the local machine without a $null sent in the invoke-command scriptblock. Why?
The same invoke-command experiment will work fine if the target is a Win10, Win2012r2, or Win8.1 system.
Resolved with this stupid workaround:
PS> icm t7 {import-module pswu; $output = test-remoteicm; $output} True hello PS>
This is blocking forward progress, and baking my noodle.
I place the following function on t7 (a Win7/PS v2 system):
I run it from a win8.1 or win10 machine thusly:
There's no output on the local machine without a $null sent in the invoke-command scriptblock. Why?
The same invoke-command experiment will work fine if the target is a Win10, Win2012r2, or Win8.1 system.