vendredi 31 juillet 2015

SQL Server Agent run powershell file not found

I created a SQL Server Agent job and here is the job detail.

  • The job owner is my windows domain login.
  • The type is OS (cmdExec)
  • Run as SQL Server Agent Service Account
  • Command:

    powershell.exe -executionpolicy bypass -file "D:\MyFolder\myFile.ps1".

When I ran the job it returned an error stating "D:\MyFolder\myFile.ps1" does not exist.

When I run the same command from cmd prompt it works find.

My question is what can I do to make SQL Server Agent Service Account "see" the file?

Thanks,

Aucun commentaire:

Enregistrer un commentaire