0
我有一个powershell命令,我想在批处理脚本中运行。它在PowerShell窗口中运行良好,但我无法在批处理脚本中正确调用它。 PowerShell命令是这样的:powershell命令invoke-sqlcmd批处理脚本
invoke-sqlcmd -inputfile "D:\Reports\sql.sql" -ServerInstance SERVER1 | export-csv "D:\Rpt\historical\sample1.csv" -Force -En UTF8
我希望有人可以帮助我。另外,是否可以包含批处理变量来代替输入和输出文件的文件路径,而不是将整个路径置于powershell命令中(stil在批处理脚本中运行)?
谢谢。