syspolicy_purge_history generates failed logins

I have a development server with 3 instances: Default, A and B. It is a physical server, non clustered. Whenever the syspolicy_purge_history job runs at 2 am, I get failed login alerts. Looking at the job steps, all are successfully completed. It appears that some point during the step "Erase Phantom System Health Records" is when the failed logins occur.

syspolicy_purge_history on instance B works OK.

syspolicy_purge_history on the Default instance seems to want to connect to instance B, resulting in:

Error: 18456, Severity: 14, State: 11. Login failed for user 
'Machinename\sqlsvc-B'. Reason: Token-based server access validation 
failed with an infrastructure error. Check for previous errors. 
[CLIENT: <local machine>] . 

No errors are reported by Powershell.

syspolicy_purge_history on the A instance seems to want to connect to the Default instance resulting in

Error: 18456, Severity: 14, State: 11. Login failed for user 
'Machinename\sqlsvc-Default'. Reason: Token-based server access 
validation failed with an infrastructure error. Check for previous 
errors. [CLIENT: <local machine>] . 

Then it tries to connect to the B instance, resulting in

Error: 18456, Severity: 14, State: 11. Login failed for user 
'Machinename\sqlsvc-B'. Reason: Token-based server access validation 
failed with an infrastructure error. Check for previous errors. 
[CLIENT: <local machine>] . 

No errors are reported by Powershell.

I tried the steps posted here hoping they would fix it. http://support.microsoft.com/kb/955726 But again, this is not a virtual server nor is it in a cluster. Do you have any suggestions? Thanks.


I used the workaround posted on that Connect page by "Kyle Neier". That worked for me.

Simply replace the PowerShell code in Step 3 of the SQL Agent Job "syspolicy_purge_history" (the one running on the default instance) with this:

$SQLServerConnection = New-Object System.Data.SqlClient.SqlConnection
$SQLServerConnection.ConnectionString = "Data Source=$(ESCAPE_NONE(SRVR));Initial Catalog=master;Integrated Security=SSPI;Application Name=syspolicy_purge_history"
$PolicyStoreConnection = New-Object Microsoft.SqlServer.Management.Sdk.Sfc.SqlStoreConnection($SQLServerConnection)
$PolicyStore = New-Object Microsoft.SqlServer.Management.Dmf.PolicyStore ($PolicyStoreConnection)
$PolicyStore.EraseSystemHealthPhantomRecords()