Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15694

Powershell runs differently in SS2008 Agent Jobs

$
0
0

I have started adding Powershell to my Agent jobs.  However, Powershell scripts which run on my desktop do not always run in a SQL Server Agent Job step as type "Powershell".  Once the syntax errors are eliminated runtime errors occcur.

But Powershell  scripts which will not run as Type "Powershell" will run as "Operating System (CmdExec)"  (powershell.exe -file . . .).

I just want to know why, since I have spent an enormous amount of time on this and could not find anything in MSDN.  It may be there, but, you now how it is.  I am thinking that SQL SErver has one version of Powershell, and it is different than what is installed with the O/S. 

Thanks,

Mike 


Viewing all articles
Browse latest Browse all 15694

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>