locked
SCCM Query based collection filtered by Name RRS feed

  • Question

  • I need to create a collection that filters the computers by name, the collection should not show computradores that end with the letter "P", "V", "M", "T" and computradores that begin with the name "base". 
    Can someone help me

    Lucas Simoes Rezende MCP, MCTS , ITIL V3

    Tuesday, August 19, 2014 2:40 PM

Answers

  • I have created to query and it worked

    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 SMS_R_System.NetbiosName not like "%P" and SMS_R_System.NetbiosName not like "%T" and SMS_R_System.NetbiosName not like "%V" and SMS_R_System.NetbiosName not like "%M" and SMS_R_System.NetbiosName not like "%Base%"


    Lucas Simoes Rezende MCP, MCTS , ITIL V3

    • Marked as answer by Lucas Simoes Tuesday, August 19, 2014 6:29 PM
    Tuesday, August 19, 2014 6:29 PM

All replies

  • you can do that in a couple of ways. If you are not familiar with WQL I'll suggest doing it like this.

    • Create 4 collections where you are looking at the computer name not like %P (and v,m,t)
    • create a collection with computer names like base%
    • Create a new collection with all computers and one Exclude Collection rule for each of the 5 collections.

    Kent Agerlund | My blogs: blog.coretech.dk/kea and SCUG.dk/ | Twitter: @Agerlund | Linkedin: Kent Agerlund | Mastering ConfigMgr 2012 The Fundamentals

    Tuesday, August 19, 2014 3:17 PM
  • I have created to query and it worked

    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 SMS_R_System.NetbiosName not like "%P" and SMS_R_System.NetbiosName not like "%T" and SMS_R_System.NetbiosName not like "%V" and SMS_R_System.NetbiosName not like "%M" and SMS_R_System.NetbiosName not like "%Base%"


    Lucas Simoes Rezende MCP, MCTS , ITIL V3

    • Marked as answer by Lucas Simoes Tuesday, August 19, 2014 6:29 PM
    Tuesday, August 19, 2014 6:29 PM