【发布时间】:2020-01-01 02:28:57
【问题描述】:
我有一个启动 powerShell 脚本的 bat 文件。我希望 bat 文件在启动脚本后继续移动,而不是等待 powerShell 脚本完成。每次当我启动 powerShell 脚本时,bat 文件都会等到 powerShell 脚本完成后再继续。下面是我如何调用我的 powerShell 脚本:
PowerShell.exe -NoProfile -ExecutionPolicy Bypass -Command "&'C:\Users\sharph\Desktop\test.ps1'"
【问题讨论】:
-
为什么需要批处理文件?只需直接在 PowerShell 中运行您的脚本。
标签: powershell batch-file