I have started setting up a couple of servers with SQL 2012 SP2. And I noticed that the syspolicy_purge_history job is failing on Step 3 with the following error message: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.
So far I have not seen any valid resolution online, so as a workaround, I have setup the Execution policy to UNDEFINED on the following registry entry:Computer\HKLM\Software\PowerShell\1\Shelllds\Microsoft.SqlServer.Management.PowerShell.sqlps110
Execution Policy, REG_SZ,Undefined
And as a warning, changing the execution policy to UNDEFINED may open security holes on your server. If you found a fix for this issues, please feel free to leave a comment so I can update this post.
Update: I found a Microsoft KB article that talks about adding a GPO to correct the issue. http://support.microsoft.com/kb/2995870