May 29, 2015 at 12:52 am
Hello,
On few SQL servers, every day "syspolicy_purge_history" job is getting failed at step 3 (Erase Phantom System Health Records) with below error message:
Message
Executed as user: Global\Test. A job step received an error at line 1 in a PowerShell script. The corresponding line is 'set-executionpolicy RemoteSigned -scope process -Force'. Correct the script and reschedule the job. The error information returned by PowerShell is: 'Security error. '. Process Exit Code -1. The step failed.
I ensure the account global\test has got sysadmin permissions on SQL and local admin on server. Also verified the SQLPS.exe file on the right location using below query.
SELECT * FROM msdb.dbo.syssubsystems WHERE start_entry_point ='PowerShellStart'
C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Binn\SQLPOWERSHELLSS.DLL
C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\SQLPS.exe
FYI..this is standalone production server with SQL 2012(SP1) Enterprise edition.
This is happening on few of our servers. Any help would be appreciated.
Thanks in advance.
May 29, 2015 at 1:31 am
I think being an admin isn't enough: you can only change executionpolicy if you start Powershell with elevated permissions (run as administrator).
March 30, 2016 at 6:06 am
Did you ever get a solution for that problem?
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply