automatically add computer in device collection

Anonymous
2022-02-14T12:28:20.127+00:00

Hi Team, I want to add computer automatically to a device collection based on buildnumber 19044 I created the next query, but it do not find the required computers: select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.BuildNumber = "19044" ![174059-add.png][1] [1]: /api/attachments/174059-add.png?platform=QnA I tried it with '19044', 10.0 (19044) or with select * from SMS_G_System_OPERATING_SYSTEM where where SMS_G_System_OPERATING_SYSTEM.BuildNumber = '19044' Could someone have more ideas how to fix this?

Microsoft Configuration Manager
{count} votes

Accepted answer
  1. AllenLiu-MSFT 43,951 Reputation points Microsoft Vendor
    2022-02-15T02:03:32.74+00:00

    Hi, anonymous user

    Thank you for posting in Microsoft Q&A forum.

    SMS_R_System also has the build info, and the info is from heartbeat discovery, but the build info in SMS_G_System_OPERATING_SYSTEM is from hardware inventory, I think you have not enable the hardware inventory because no info in your Resource Explorer, so you may use the query like this:

    Select * from SMS_R_System where SMS_R_System.Build="10.0.19044"  
    

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    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.


3 additional answers

Sort by: Most helpful
  1. Anonymous
    2022-02-16T18:31:56.217+00:00

    I changed the query to look for the OU instead of the buildnumber.
    It worked now fine!

    1 person found this answer helpful.

  2. Garth Jones 1,661 Reputation points
    2022-02-14T13:18:19.48+00:00

    On a computer with that version, have you reviewed Resource Explorer to confirm that it shows that version?


  3. Garth 5,801 Reputation points
    2022-02-15T23:48:20.38+00:00

    Every one minute for hw inventory is far too often and may cause problems. Set it to once a day.

    Since you have set this to once a minute you might need to force a full hw inventory on all of your computers.
    https://www.recastsoftware.com/resources/updated-how-to-perform-a-full-hardware-inventory-of-a-pc-collection-the-easy-way/

    0 comments No comments

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.