I recently installed SQL Server 2012 Ent (x64). The install is a stand alone default instance.
The syspolicy_purge_history job fails on step three with the following error:
Executed as user: <DomainName>\sql_xxx_agt_svc. 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.
Here is the code that is in the step:
if ('$(ESCAPE_SQUOTE(INST))' -eq 'MSSQLSERVER') {$a = '\DEFAULT'} ELSE {$a = ''};
(Get-Item SQLSERVER:\SQLPolicy\$(ESCAPE_NONE(SRVR))$a).EraseSystemHealthPhantomRecords()
The domain user is the account that SQL Agent is running as.
What permissions need to be granted to this account?
Here is the link to the Connect post: