2012-01-31 45 views
0

我試着用CMD運行其中一個.bat文件。如何安裝Sharepoint開發工具包實驗室

第一行它的工作原理

powershell -Command "Set-ExecutionPolicy Unrestricted" 
powershell -Command "& {.\SetupLabxx.ps1}" -NoExit 

暫停

第二行給了我這個異常

術語」。\ SetupLabxx.ps1' 沒有被識別爲名稱一個cmdlet, 函數,腳本文件或可操作的程序。檢查 名稱的拼寫,或者如果包含拍打,請驗證路徑是否正確,然後再次嘗試 。在行:1字符:{\ SetupLabxx.ps1 < < < <} 20 + & -noexit + CategoryInfo:ObjectNotFound:(\ SetupLabxx.ps1:字符串)[],鈷 mmandNotFoundException + FullyQualifiedErrorId: CommandNotFoundException

回答

1

您可以將這些命令(使用完整路徑腳本):

powershell.exe -NoExit -ExecutionPolicy Unrestricted -File c:\SetupLabxx.ps1 
相關問題