我有一個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 –