question

Scot Hauder avatar image
Scot Hauder asked

Powershell in SQL Agent Step Insufficient Permissions

I'm trying to update Active Directory from a PowerShell script step in an SQLServer Agent Step.(selected PowerShell for step type) The service account SQLServer Agent runs under has permissions to update AD (Domain Admin) If I log in as the SQLServer Agent account i can run the script successfully. When it runs as a scheduled job, it fails with insufficient permissions error. Any idea how i can get this to run with the proper elevated permissions from within the SQL job?
sql-server-2008-r2powershellsql agent
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Are you using the AD module? If you run the job as cmdexec step does it complete as expected?
0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.