My interpretation is that Agent is not able to create the Windows process to run the PowerShell script. Is this PROD\UserAccount a sysadmin account?
Pausing a cluster node with a HADR environment SQL 2017 is getting failed through SQL JOB step.
Pausing a cluster node in a HADR environment SQL 2017 is getting failed through SQL JOB step using a proxy account.
However it is succeeding if manually executed on the PowerShell ISE window with the proxy account even without administrator privileges, It doesn't seems to be a elevated permissions issue.
I have tried fixing the issue by adding the account in local administrator group and local security policy "Replace a process-level token" still it is getting failed. Can you please help fix it?
Executed as user: PROD\UserAccount. The process could not be created for step 1 of job 0x59E3E9BB56FEA04CB5AC0456628AD770 (reason: A required privilege is not held by the client). The step failed.
Running below command as a powershell script through sql job step:
$localHost = [System.Net.Dns]::GetHostName()
#Initiating Node Drain before patching
Suspend-ClusterNode -Name $localHost -Drain
Sign in to comment
Sort by: Most helpful
Hi @Mahesh Kharawatkar ,
The error message you are receiving indicates that the account used to run the SQL job step does not have the required privileges to execute the PowerShell script.
You can add the account to the local administrators group on the SQL Server node. What is more, you can try to run the SQL Job step with a different proxy account that has the necessary privileges.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".