我有一個PowerShell腳本的網站添加到Internet Explorer中的受信任的站點:如何從批處理文件執行powershell命令?
set-location "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
set-location ZoneMap\Domains
new-item TESTSERVERNAME
set-location TESTSERVERNAME
new-itemproperty . -Name http -Value 2 -Type DWORD
我想執行批處理文件,這些PowerShell命令。這似乎很簡單,當我必須運行一個命令,在這種情況下,我有一系列相關的命令,但是。我想避免爲從批處理中調用的PS腳本創建單獨的文件 - 所有內容都必須位於批處理文件中。
問題是:如何從批處理文件執行powershell命令(或語句)?
另見... http://stackoverflow.com/questions/2035193/how-to-run-a-powershell-script – SteveC 2013-08-29 09:32:23