【发布时间】:2014-08-15 12:02:28
【问题描述】:
我正在运行以下 powershell 命令:
$cmd = "xxx.exe"
Invoke-Command -ComputerName localhost {Invoke-Expression $cmd}
但是我得到了错误:
Cannot bind argument to parameter 'Command' because it is null.
+ CategoryInfo : InvalidData: (:) [Invoke-Expression], ParameterB
indingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,M
icrosoft.PowerShell.Commands.InvokeExpressionCommand
【问题讨论】: