这不起作用:
$server = "server";
$cmd = "hostname";
C:\Users\ss\Documents\Scripts\PSTools\PsExec.exe \\$server $cmd;
但这将:
$server = "server";
C:\Users\ss\Documents\Scripts\PSTools\PsExec.exe \\$server hostname;
为什么?
这不起作用:
$server = "server";
$cmd = "hostname";
C:\Users\ss\Documents\Scripts\PSTools\PsExec.exe \\$server $cmd;
但这将:
$server = "server";
C:\Users\ss\Documents\Scripts\PSTools\PsExec.exe \\$server hostname;
为什么?