How can I get this output?

“` $myrb = { [System.Console]::WriteLine(“test”) }

Invoke-Command -ScriptBlock $myrb -Credential $creds -ComputerName ‘localhost’ “` No output

Anyone managed to successfully capture output like this before? My specific use case is for running DbUp (if you are familiar with it) in a remote session. Same issue as above, the code is executed however I can’t seems to get the compiled type output to show up 🙁

submitted by /u/inamamthe
[link] [comments]

Leave a Reply