Devnull , <NUL.
I tried to execute a Powershell command through a Cygwin Openssh connection with a Perl script on a remote computer. Instead of creating a batch file, I write Powershell commands to the ps1 file, passing it through scp, and then running it on top of ssh with the following Perl:
my ($stdout,$stderr) = Net::SSH->new( "user@host" )->capture2( { timeout => $timeout }, "powershell -file $copied_ps1_file<NUL");
source
share