Powershell Permissions

  • I am attempting to run a Powershell step through SQL Agent.

    The owner of the job can execute Powershell from outside SQL Agent.

    I have created a credential and given it proxies for Powershell, SSIS Package Execution, and CmdExe

    I'm still getting the following error

    Executed as user: [RedactedAccount]. The process could not be created for step 4 of job 0x6F48FE630C999B4081180F07C7D2C843 (reason: A required privilege is not held by the client). The step failed.

    What am I doing wrong?

    --------------------------------------
    When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
    --------------------------------------
    It’s unpleasantly like being drunk.
    What’s so unpleasant about being drunk?
    You ask a glass of water. -- Douglas Adams

  • It depends on what is your script doing, can you provide the script or an example? What version of SQL Server?

    Shawn Melton
    Twitter: @wsmelton
    Blog: wsmelton.github.com
    Github: wsmelton

  • Shawn Melton (10/27/2015)


    It depends on what is your script doing, can you provide the script or an example? What version of SQL Server?

    It never gets to the script. It is attempting SQL Azure cmdlets, but that's a different set of problems.

    It is SQL Server 2014 running a 2008 database in 2008 compatibility mode.

    --------------------------------------
    When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
    --------------------------------------
    It’s unpleasantly like being drunk.
    What’s so unpleasant about being drunk?
    You ask a glass of water. -- Douglas Adams

  • Might be related, but has the agent account changed since setup? And if so was it done via services.msc or SQL Server Config Manager?

    If services.msc, go to SQL Server Config Manager, set the agent to local system, then set it back to a domain account. This ensures the account gets added to the right groups etc

  • anthony.green (10/28/2015)


    Might be related, but has the agent account changed since setup? And if so was it done via services.msc or SQL Server Config Manager?

    If services.msc, go to SQL Server Config Manager, set the agent to local system, then set it back to a domain account. This ensures the account gets added to the right groups etc

    That was all I'd been able to find online. I'd been hoping it wasn't that because now I have to get other people to do it and it might not fix the problem.

    OK, I'll try this. Thanks for the push. : -)

    --------------------------------------
    When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
    --------------------------------------
    It’s unpleasantly like being drunk.
    What’s so unpleasant about being drunk?
    You ask a glass of water. -- Douglas Adams

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply