sccm/sql query

Vijayaguru M 41 Reputation points
2021-03-04T18:22:36.91+00:00

Hi,

Can anyone help me with SCCM/SQL query based on error code found in Policyagent.log eg. 0x87d00231 (-2016411087). I need to find the machines which have that above error code and we need to reinstall sccm client only those machines.

I can find the query based on Update compliance error codes but not with policyagent.

Thanks,
VJ

Microsoft Configuration Manager
0 comments No comments
{count} votes

Accepted answer
  1. Youssef Saad 3,411 Reputation points
    2021-03-06T13:28:59.137+00:00

    Hi @Vijayaguru M ,

    You can try using the following CMPivot query:

    CcmLog('PolicyAgent') | where (LogText like '%0x87d00231%') | distinct Device

    75005-ccmlog-cmpivot.png

    Once you have the list of devices, you can create a collection from the CMPivot also then follow your troubleshoot.

    Regards,


    Youssef Saad | Blog: https://youssef-saad.blogspot.com
    Please remember to ** “Accept answer” ** or upvote for useful answers, thank you!


2 additional answers

Sort by: Most helpful
  1. Jason Sandys 31,296 Reputation points Microsoft Employee
    2021-03-04T21:11:47.573+00:00

    You're not going to find this as it's nothing that is collected centrally although you may be able to use CMPivot or a PowerShell script deployed using a baseline. However, the error code literally means "Transient error" which is indicative of an issue with the client system having problems communicating with the site and is also often at the network layer so even if this information was collected, the client wouldn't be able to send it to the site anyway or download policies for a baseline so you're still stuck. Reinstalling the client agent is almost certainly not going to resolve this issue here as the issue is a communication issue between the client the MP. You need to troubleshoot the root cause here of the transient issue here.


  2. AllenLiu-MSFT 45,066 Reputation points Microsoft Vendor
    2021-03-05T02:25:22.043+00:00

    Hi, @Vijayaguru M
    Thank you for posting in Microsoft Q&A forum.
    0x87d00231 is a fairly generic error message that pretty much just means "something went wrong".
    When you find this error on clients, you may check CcmMessaging.log on those clients for more details.
    And since the error code is not a final results, it will not be recorded in SCCM database like update compliance error, so no sql query can do this.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.