sql server - Powershell remotesigned policy not working with SQL agent Job, but working if run "manually" -



sql server - Powershell remotesigned policy not working with SQL agent Job, but working if run "manually" -

i have sql 2008 job database backups using powershell script. each step in sql job "operating scheme (cmdexec)" type. each step kicks off powershell script performs sql backup , other things. script lives on remote server, if need create changes, have create them once.

if set powershell execution policy "bypass", sql job works. if set "remote signed", fails saying execution policy not set correctly. however, if kick off script cmd window, runs correctly. server 64 bit, have made sure both 32 bit , 64 bit shells have execution policy set "remotesigned". and, have remote server unc path set trusted intranet site in ie (found powershell treats local unc paths http paths, unless set in ie).

like said, runs correctly manually kick if off cmd window execution policy set remote signed, , works if sql job kicks if off if execution policy set bypass. fails if gets kicked off sql , execution policy set remotesigned.

it’s been running year without issue powershell execution policy set bypass, i’m beingness told set execution policy remotesigned now. keeping @ bypass no longer option.

any thoughts?

sounds credentials under job run different login credentials.

you may have alter permissions agent job user allow powershell script run expected.

sql-server sql-server-2008 powershell powershell-v2.0 sql-agent

Comments

Popular posts from this blog

delphi - blogger via idHTTP : error 400 bad request -

c++ - compiler errors when initializing EXPECT_CALL with function which has program_options::variables_map as parameter -

How do I check if an insert was successful with MySQLdb in Python? -