August 14, 2015 at 5:28 am
Dear list,
I am able to run get-services from powershell command window/ise but when I schedule the same script in SQL agent job and execute, it is failing with cannot open service control manager.
Can anyone share your experience on this.
Thanks
Kowsalya
August 14, 2015 at 1:32 pm
Sounds like a permissions issue to me. What is the security context that you are running job step under?
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 15, 2015 at 12:29 am
SQL job owner is sa and running with SQL server service account
August 17, 2015 at 6:59 am
Kummu (8/15/2015)
SQL job owner is sa and running with SQL server service account
Sounds like the service account SQL Server Agent is running under doesn't have permissions to access service control manager. You should look into using a SQL Server Agent Proxy Account, https://technet.microsoft.com/en-us/library/ms189064(v=sql.105).aspx
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply