syspolicy_purge_history PowerShell Security Error

  • Hi,

    I have a SQL Server 2014 instance running on a SQL Server 2008 R2 server. The server is not clustered, it is just a stand alone SQL Server. The syspolicy_purge_history job fails every now and then with the error message: "A job step received an error at line 1 in a PowerShell script. The corresponding line is 'import-module SQLPS -DisableNameChecking'. Correct the script and reschedule the job. The error information returned by PowerShell is: 'Access to the path 'PowerShell_CommandAnalysis_Lock' is denied. '. Process Exit Code -1. The step failed."

    Has anyone see this before? Google isn't bringing up much besides the whole"If this is a clustered server make sure you have the right server name in the command" answer, which isn't the case here. Some days this job fails and some days it succeeds. I have checked out task scheduler to see if there were any conflicts there, found nothing. Nothing in the event viewer either. Does anyone have any idea of where I should start looking next?

    Thank you,

    -Balkoth

  • Thank our reply.

    Looks like this may be the case. Right now we only have PowerShell 2.0 installed. I will update this thread when we can prove this theory out, it will be a little while before I can reboot the server for the PowerShell install.

    Thank you again,

    -Balkoth

Viewing 3 posts - 1 through 2 (of 2 total)

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