Answers:
我想你问的是如何从Powershell脚本运行命令......你可能想要使用Invoke-Command cmdlet。你的脚本看起来像这样:
Invoke-Command setup.cmd -ArgumentList install-setupforced
这可能有用。请务必查看help Invoke-Command
Powershell。
Get-Help Invoke-Command
PowerShell 3.0开始:“ Invoke-Command [[-Session] <PSSession []>] [-FilePath] <string> [-ThrottleLimit <int>] [-AsJob] [-HideComputerName] [-JobName <string>] [ -InputObject <psobject>] [-ArgumentList <Object []>] [<CommonParameters>]“