小编Aus*_*tin的帖子

批量运行 Windows PowerShell,然后让它运行一些文本

我是制作批处理文件的新手。我正在尝试运行一个命令,该命令将在特定目录中打开 Windows PowerShell,然后在那里运行一个命令。

到目前为止,我有以下内容。Powershell.exe -noexit -command "cd 'c:\Dev\ProductDev'"这似乎可以将 PowerShell 打开到正确的位置,但我无法让它运行命令node sp

我尝试了以下但没有成功 PowerShell -NoExit -Command "Write-Host 'node sp'"

另外,是否可以让它在蓝色显示屏幕而不是 CMD(黑/白)窗口中打开 Windows PowerShell?

windows powershell batch command-line windows-8.1

3
推荐指数
1
解决办法
4万
查看次数

标签 统计

batch ×1

command-line ×1

powershell ×1

windows ×1

windows-8.1 ×1