Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
powershell设置窗口大小并使用参数执行脚本_Powershell - Fatal编程技术网

powershell设置窗口大小并使用参数执行脚本

powershell设置窗口大小并使用参数执行脚本,powershell,Powershell,我试图在循环中执行powershell的新实例并传入参数。我能够做到这一点,但设置窗口大小的附加参数似乎破坏了一切 当前工作,不设置窗口大小 启动进程powershell-argumentlist“-noexit-文件c:\test\script.ps1-端口12345” 如果我单独运行下面的代码,它会工作,但我似乎不知道如何将它与上面的代码合并 powershell-argumentlist“-noexit模式con:cols=72行=5” 我尝试了以下操作,但出现了错误: powershel

我试图在循环中执行powershell的新实例并传入参数。我能够做到这一点,但设置窗口大小的附加参数似乎破坏了一切

当前工作,不设置窗口大小

启动进程powershell-argumentlist“-noexit-文件c:\test\script.ps1-端口12345”

如果我单独运行下面的代码,它会工作,但我似乎不知道如何将它与上面的代码合并

powershell-argumentlist“-noexit模式con:cols=72行=5”

我尝试了以下操作,但出现了错误:

powershell-argumentlist“-noexit模式con:cols=72行=5-文件c:\test\script.ps1-端口12345”


无效参数--file

这是否回答了您的问题?不,它没有,正如我说的,我可以自己设置窗口大小,但我遇到的麻烦是设置窗口大小和执行带有参数的脚本是一个命令。