PowerShell

CygwinからPowerShellを実行

$( cmd /C "powershell -Command .\TargetSscript.ps1 args" <

Windows+PowerShellでリモートPC上で、任意のコマンドを実行する。

RemotePC上で任意のコマンドを実行する 以下のPowerShellスクリプトをファイルとして保存する。 ここでは「RemoteCommand.ps1」とする。 Param( $computer, $username, $passwd, $command ) $password = ConvertTo-SecureString $passwd -asplaintext -force…