我有一个Powershell脚本将CSV文件转换为Excel,但是我想创建一个批处理文件来执行Powershell脚本。当我尝试,我得到一个错误信息:批处理文件执行Powershell脚本
error processing aurguments. there is no option with the following name: execution policy.
Syntax
powershell_ise.exe[[-File] <listoffiles>][-Help]-[MTA][-Noprofile]
批处理文件脚本是:
@echo off
Powershell_ise.exe -executionpolicy remotesigned -File C:\Users\siddhary\Desktop\csv_to_xlsx .ps1
但是当我打开Powershell_ise.exe
,然后从桌面&运行打开脚本,它成功地运行。但是,当我尝试使用批处理文件做到这一点时,我收到了上述错误消息。 请帮忙。
错误似乎很不言自明的。该选项不受支持。 http://technet.microsoft.com/library/hh847883 –