【发布时间】:2019-11-14 10:11:51
【问题描述】:
我目前无法在我拥有的 unattend.xml 文件中运行 powershell 脚本。 powershell 应该安装应用程序,但 xml 文件似乎无法运行脚本的行。
我在使用<FirstLogonCommands>、<RunSynchronousCommand> 和<SynchronousCommand> 之间来回切换
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<CommandLine>Powershell -ExecutionPolicy ByPass -File \\deploy\RemoteInstall\WdsClientUnattend\deploySoftware.ps1</CommandLine>
<Description>Installs software</Description>
<Order>1</Order>
</SynchronousCommand>
</FirstLogonCommands>
这个命令应该运行从我们的服务器安装应用程序的 ps1 脚本。
【问题讨论】:
-
“似乎无法运行脚本行”是什么意思?您收到错误消息吗? (记住:我们看不到你的屏幕。)
-
根据 setuperr 日志,它说它在运行 FirstLogonCommands 时遇到问题。给出的描述是“该设置未在此上下文中定义。”
-
用你遇到的所有错误更新你的问题。
标签: xml powershell scripting windows-10 unattend-file