Last active
January 23, 2016 10:18
-
-
Save bklockwood/a13011f12af6cd452c52 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function test-remoteicm { | |
[CmdletBinding()] | |
Param () | |
$true | |
write-output "hello" | |
} | |
Finally I have found a workaround for this:
PS> icm t7 {import-module pswu; $output = test-remoteicm; $output}
True
hello
PS>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I run the above function (which is in a Powershell module called "pswu") 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.