Close Menu
    Facebook X (Twitter) Instagram
    Sunday, October 12
    X (Twitter) LinkedIn Reddit RSS
    All about Endpoint Management
    • Home
    All about Endpoint Management
    Home»CM2012»SCCM Configmgr 2012 Create device collection using the User Department attribute

    SCCM Configmgr 2012 Create device collection using the User Department attribute

    Eswar KonetiBy Eswar KonetiNovember 17, 8:21 am2 Mins Read CM2012 4,913 Views
    Share
    Facebook Twitter LinkedIn Reddit

     

    Recently ,I have got a request from the business unit manager on the reboot of computers due to patch management (applicable to Applications as well) .The Custom client device setting ‘ Display temporary notification to the user ' (shown below) set with 480 minutes across the enterprise workstations but specific department (ex: Engineering), not happy with this setting  due to the nature of their business. So ,we have agreed to have custom reboot settings .

    image

    Creating Custom device settings and applying it onto collection is not that much difficult but the deal here is,creating a device collection using user department.

    Once we have this collection,we can create device client settings and make sure this has higher priority over the other Client device settings that has similar setting applied to all workstations.The higher the priority (Low number is applied first than higher number) will be applied onto clients. You can also use resultant set of policies to check the client device settings for particular client from SCCM device collection.

    How to create Device collection using Department attribute :

    Before creating collection ,make sure you have department attribute added to the active Directory user discovery properties.

    image

    Device Collection:

    Create new collection,select the limiting collection,edit the Query ,paste the following query .(change the department Name) .When you click Ok,you may get errors but just ignore them.Collection works good.

    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 JOIN SMS_UserMachineRelationship ON SMS_R_System.Name=SMS_UserMachineRelationship.ResourceName
    JOIN SMS_R_User ON SMS_UserMachineRelationship.UniqueUserName = SMS_R_User.UniqueUserName
    WHERE   SMS_UserMachineRelationship.Types=1 AND SMS_R_User.department0 like "Engineering"

    CM12 Collection configmgr Device collection Reboot client settings SCCM 2012 User attribute user department WQL
    Share. Twitter LinkedIn Email Facebook Reddit

    Related Posts

    SCCM SQL Report – Compare Installed Apps on TWO Different Computers

    July 13, 10:35 am

    Optimize Your Intune Workflow with a Powerful Browser Extension

    March 22, 10:39 am

    Migrate Microsoft 365 Updates from SCCM/MECM to Intune for Co-Managed Devices

    February 11, 9:50 pm

    5 Comments

    1. Jon Haustetter on March 10, 2017 10:32 PM

      Hi, I have added a few user attribute to the user discovery as described above however they never show on the users object properties even after a week. Any thoughts?

      Reply
      • Eswar Koneti on March 11, 2017 3:49 PM

        check user discovery logs if user discovery method is discovering objects of custom attributes that you defined .

        Regards,
        Eswar

        Reply
    2. Jon Haustetter on March 10, 2017 10:26 PM

      Hi, I have added the custom attributes as described above: extensionAttribute2, employeeID & employeeNumber to the User Discovery but they do not show, even after waiting for week. Any thoughts?

      Reply
    3. Cory on January 14, 2016 4:32 AM

      Like where you are going with this... I have multiple domains and only want this to be for 1 Domain and also I want to make this use department as you are but want to exclude all users that have a specific manager (I have this attribute pulled in already) Thoughts?

      Reply
      • Eswar Koneti on January 25, 2016 8:40 AM

        you can go with subselected query here, get list of all users whose manager is x and then use subselected query to filter username not in from all users and domain=eskonr.com..

        Reply

    Leave a ReplyCancel reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Sign Up

    Get email notifications for new posts.

    Author

    I’m Eswar Koneti ,a tech enthusiast, security advocate, and your guide to Microsoft Intune and Modern Device Management. My goal? To turn complex tech into actionable insights for a streamlined management experience. Let’s navigate this journey together!

    Support

    Awards

    Archives

    © Copyright 2009-2025 Eswar Koneti, All rights reserved.

    Type above and press Enter to search. Press Esc to cancel.