Create a dynamic collection of newly joined clients - is it Possible?

M Tran 491 Reputation points
2022-04-14T15:02:01.013+00:00

I am looking for a way to create a dynamic collection that pulls only freshly joined clients (i.e: when a newly set up computer joins the domain and gets the SCCM client installed). Is this even possible?

I tried the query below but it pulled computers that came back online after being offline for a period. It did not pull new clients. This is not what I am looking for.

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 WHERE DateDiff(dd,SMS_R_System.CreationDate, GetDate()) <= 1

Why I need this collection? I have a group of standard apps that needs to be installed whenever we set up a brand new computer. These apps have already been installed on existing clients. I do not want to deploy the apps to the "all workstations" collection, to avoid any possible issues or complications, so I just want these standard apps to install on fresh computers only.

Any suggestions are greatly appreciated.

Thank you!

Microsoft Configuration Manager
0 comments No comments
{count} votes

Accepted answer
  1. Sherry Kissinger 5,261 Reputation points
    2022-04-19T02:24:49.27+00:00
    2 people found this answer helpful.
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. M Tran 491 Reputation points
    2022-04-19T15:09:35.173+00:00

    Thank you @Simon Ren-MSFT and @Sherry Kissinger !

    I will try this. I think the post is what I am looking for.

    1 person found this answer helpful.

  2. Simon Ren-MSFT 36,556 Reputation points Microsoft Vendor
    2022-04-14T18:20:31.03+00:00

    Hi @M Tran ,

    Thanks for posting in Microsoft MECM Q&A forum.

    ==>Why I need this collection? I have a group of standard apps that needs to be installed whenever we set up a brand new computer. These apps have already been installed on existing clients. I do not want to deploy the apps to the "all workstations" collection, to avoid any possible issues or complications, so I just want these standard apps to install on fresh computers only.

    For this purpose, we can add the computer to the specified collection during OSD, so it will get the policies (apps, updates etc.) after OSD completed. Some threads for your reference:

    ADD A DEVICE TO A COLLECTION DURING A TASK SEQUENCE
    Add device to collection as part of OSD Task Sequence
    How to add a Known/Unknown Computer to a specified collection during OS Deployment
    Adding a device to an SCCM collection during OSD

    Hope it helps. Have a nice day!

    Best regards,
    Simon


    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.


  3. Sherry Kissinger 5,261 Reputation points
    2022-04-26T13:34:11.713+00:00

    "Will these machine eventually "leave" the collection on their own after some time has elapsed? That is what I would want."

    That is what "should happen", yes. But that's why you shouldn't just believe me, lol. "Trust, but Verify". I suggest you literally write down the machines that are in that collection as of "now" on a notepad or an Appointment to yourself in 3 days time... to go check that the ones that are in there now... are no longer there in 3 days (and potentially other ones have dropped in).

    Don't just trust me. I could be evil. You don't know.

    fyi, I tend to look at sql, not the console. select fcm.Name [ComputerName] from v_fullcollectionmembership fcm where fcm.collectionid = (Select collectionid from v_collection c where c.name = 'WhateverYouCalledThatCollection')

    would be one possible way to list boxes in that collection, without looking in the console.


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.