Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.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
从.bat文件调用PowerShell脚本_Powershell - Fatal编程技术网

从.bat文件调用PowerShell脚本

从.bat文件调用PowerShell脚本,powershell,Powershell,我有一个.bat,如下所示 @echo off powershell "D:\EmailConnector-Disc Optimus\Output\Test_Eamil.ps1" > "D:\EmailConnector-Disc Optimus\logs\test.log" pause 但是它没有在输出中显示任何日志,我故意在脚本中保留了一些错误。你能帮我解决这个问题吗。我想这可能是你的test_email.ps1中的一个错误,你能把它添加到你的问题中吗?另外,如果你删除重定向,脚本是

我有一个.bat,如下所示

@echo off
powershell "D:\EmailConnector-Disc Optimus\Output\Test_Eamil.ps1" > "D:\EmailConnector-Disc Optimus\logs\test.log"
pause

但是它没有在输出中显示任何日志,我故意在脚本中保留了一些错误。你能帮我解决这个问题吗。

我想这可能是你的test_email.ps1中的一个错误,你能把它添加到你的问题中吗?另外,如果你删除重定向,脚本是否会生成任何输出?如果我删除重定向,它将生成输出