1
我想在Microsoft Management Studio中執行powershell腳本。 但我得到一個錯誤。看看下面的詳細信息:ms sql powershell
EXEC master..xp_cmdshell '%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy unrestricted -command "C:\tmp_es\test.ps1"'
C:\tmp_es\test.ps1 : The term 'C:\tmp_es\test.ps1' is not recognized as the
name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is
correct and try again.
這可能是因爲SQL進程沒有訪問'C:\ tmp_es'嘗試改變在'tmp_es'權限閱讀所有用戶。 –
我認爲你是對的。但是現在我必須知道SQL管理工作室服務器的名稱是什麼。你可能知道嗎? –
您是在Management Studio的同一臺機器上運行Sql Server還是在遠程服務器上運行? – vonPryz