Query based collections SCCM 2012 R2

Hi to everyone. Is there any book or other material needed to master process of creating query-based collections? It is done using WQL not T-SQL so it is a little bit tricky, not only syntax itself but also classes where particular information useful to
create custom query-based collection can be found. I used WQL before only to create WMI filters for some GPOs in order to narrow their scope e.g. only to Windows 7 workstations in domain. These WMI filters were usually created
with one short WQL line, it was very simple WQL query. Bare in mind all classes that exist in SCCM database googling can be useful to solve some problems but it would be better to have some book and to master creation of query-based
collections.  

Hi,
You could review the file smsprov.log.
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place.

Similar Messages

  • SCCM 2012 R2 - query based Collection based on missing update

    Hi,
    I was wondering if anyone knew what attribute to use in console to create query based collection for missing patches? I viewed the entire list of attributes available in console but I cannot seem to find anything that says "Windows Updates" or
    something similar.
    thanks

    You might also consider creating a saved search with all updates that are deployed but still required.
    Kent Agerlund | My blogs: blog.coretech.dk and
    SCUG.DK | Twitter: @Agerlund | Linkedin:
    Kent Agerlund | Author:
    Mastering System Center 2012 R2 Configuration Manager

  • Need to make collection Query statement by sccm 2012 sp1 for Count of Licenses by License Status

    I want to make collection Query statement by sccm 2012 sp1 for all windows activated and all non-activated windows.
    Ahmed Sherif

    Have a look at the Software Licensing Product attribute classes when creating a Query - remember to choose
    System Ressource when creating the Query. You would have to enable this class to be collected during Hardware Inventory. Go to
    Client Settings -> Hardware Inventory ->
    Set Classes -> Select Software Licensing Product.
    This Class is part of the Asset Intelligence classes so you could enable it from there as well.
    Another way to accomplish is to use Compliance Settings to get this information.
    Create a Configuration item that query the Win32_WindowsProductActivation WMI Class, if you are using XP and the
    SoftwareLicensingProduct class for later os´s
    Add this Configuration Item to a Baseline ad deploy it to your Collections as needed.
    When the Baseline has been evaluated you can use this information to create query
    Machines reported as compliant is actived and machines reported as Non-Compliant is not activated.
    You can read about the Win32_WindowsProductActivation WMI Class here:
    http://msdn.microsoft.com/en-us/library/aa394520(v=vs.85).aspx
    and the SoftwareLicensingProduct here:
    http://msdn.microsoft.com/en-us/library/cc534596(v=vs.85).aspx

  • Update membership is taking too long to update members in the collection - SCCM 2012 R2 + CU1

    Hi,
    We have a standalone primary site server hierarchy (SCCM 2012 R2 + CU1), Not only with this upgrade.starting from the SCCM 2012 SP1, We had an issue that members in the collections are not being updated as expected (like SCCM 2007).
    I have created about 20+ query based collections with the normal with the "Full schedule" option but not used "Incremental update" option. Also i have observed that after a day or so..members are appearing.
    anyone had solution to this, why this collection update membership in SCCM 2012 is improper?
    Thanks.
    srkr

    Hi Torsten,
    We have about 25 machines in each collection, My collection condition is based on the package (Ex:if the package is not installed on the machine, it will appear in the collection to target the package),
    WQL query looks good, I have used the same logic for all the collections with different package.
    I did not see any error in colleval.log, all the collections are evaluating properly,but I can see .CEP files in COLLEVAL.BOX which has 0 KB size.
    Any Idea?
    srkr

  • How to deploy configuration manager client package to a query based collection

    Hi
    I have created one OU based collection.Now i wants to deploy client package to this collection so that the client automatically get installed,whenever a new machine added to the OU and so on to the collection.
    But the issue is with configuration manager client package deployment,as we can't deploy the default configuration package to the collection(Deploy option is grayed out). For this i created a new configuration manager client package and deployed this package
    to the query based collection. 
    Now when a new machine added to this collection,the client did not appear to deploy on this machine. Please help

    If you want all the devices in the OU to get the client, you can use a Computer Startup Script to deploy it.  Everybody just uses Jason's since it does everything and is well documented.
    http://blog.configmgrftw.com/configmgr-client-startup-script/
    I hope that helps,
    Nash
    Nash Pherson, Senior Systems Consultant
    Now Micro -
    My Blog Posts
    If you've found a bug or want the product worked differently,
    share your feedback.
    <-- If this post was helpful, please click "Vote as Helpful".

  • Query based collection

    Hi everyone, i  am using sccm 2012 R2 
    I want to create a device collection  based on operating system versions like winxp x86, winxp x64, win7x86, win7x64, win8 x86, win8 x64, win8.1 x64 win8.1 x86.
    please do guide me how to create query based collection

    Operating system
    Version number
    Windows 8.1
    6.3*
    Windows Server 2012 R2
    6.3*
    Windows 8
    6.2
    Windows Server 2012
    6.2
    Windows 7
    6.1
    Windows Server 2008 R2
    6.1
    Windows Server 2008
    6.0
    Windows Vista
    6.0
    Windows Server 2003 R2
    5.2
    Windows Server 2003
    5.2
    Windows XP 64-Bit Edition
    5.2
    Windows XP
    5.1
    Windows 2000
    5.0
    For more infomation, pleaes review the link below:
    List of Microsoft Windows versions
    http://en.wikipedia.org/wiki/List_of_Microsoft_Windows_versions
    Use the following query to build collection.
    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.OperatingSystemNameandVersion like "%Workstation%"/"%Server%"
    and SMS_R_System.OperatingSystemNameandVersion like "%6.2%"
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Creating a query in a collection - SCCM 2012

    Hi Everyone,
    I've got a weird issue and was hoping you techies could shed a light.
    I'm trying to create a script that makes a query into a collection with input from a CSV file. (this is a part of a bigger script, but this is what I'm having trouble with at the moment).
    #Import CSV
    $source = Import-Csv -Path C:\temp\source.csv -Delimiter ","
    foreach ($row in $source) {
    #Variables
    $ApplicationName = $row.ApplicationName
    $Customer = $row.Customer
    $ApplicationDL = $row.ApplicationDL
    $QueryPath = "$Customer\$ApplicationDL"
    $ApplicationDescription = $row.ApplicationDescription
    #Creates a Query Rule in the Collection
    Add-CMDeviceCollectionQueryMembershipRule -CollectionName $ApplicationName -QueryExpression "select * from SMS_R_System where SMS_R_System.SystemGroupName = '$QueryPath'" -RuleName $ApplicationName
    This is a multi-tenant environment so each customer has their own child domain. For example lets say that my root domain is contoso.com and my childdomain is test (and thus test.contoso.com).
    That is why I've created $QueryPath, which results in: test\groupname (The same as when I do it manually) 
    However the problem is when I execute this script it simply does not create the query.
    I don't get an error or what so ever.
    When I change $QueryPath to $ApplicationDL (resulting in just 'groupname' without the domain prefix) it actually does create the query but at that point it is not functional because it needs the domain prefix of the child-domain.
    Any help is much appreciated.
    Thanks in advance :)

    Sorry - chnage this line:
    $QueryPath='{}\{}'
    -f $row.Customer,$row.ApplicationDL
    To this:
    $QueryPath='{0}\{1}'
    -f $row.Customer,$row.ApplicationDL
    ¯\_(ツ)_/¯

  • Query for collection is not function on SCCM 2012 R2

    Hi,
    I have a System Center 2012 R2 Config Manager as single management point. The SCCM is already have Endpoint Protection Point role installed. Then I need to create a new collection that contain all SCEP clients, to as deployment target of a rule and policy.
    I've try to create a query-based collection, with the following query language :
    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_INSTALLED_SOFTWARE on SMS_G_System_INSTALLED_SOFTWARE.ResourceId
    = SMS_R_System.ResourceId where SMS_G_System_INSTALLED_SOFTWARE.ProductName = "System Center 2012 Endpoint Protection"
    But after the collection is created, none of the emerging client that have SCEP installed.
    Earlier I have apply this query on the SCCM 2012 SP1 environtment, and it is work. But now I have migrate to the SCCM 2012 R2, and this query is seems not function on R2 version. 
    Is there difference query language between SCCM 2012 SP1 and R2?
    Thanks.
    Regards, Bar Waelah

    Hi,
    I saw System Center 2012 Endpoint Protection is under Installed Applications (64) node when I open Resource Explorer on a computer that installed System Center 2012 Endpoint Protection.
    So I edited your query, then these computers appeared on the collection.
    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_ADD_REMOVE_PROGRAMS_64 on SMS_G_System_ADD_REMOVE_PROGRAMS_64.ResourceID
    = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS_64.DisplayName like "System Center 2012 Endpoint Protection"
    Best Regards,
    Joyce Li
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • SCCM 2012 Query collection problem

    Hi!
    I have problem with query based collections. I want to create collection where is computers with db2 client and sql express installed. Query is like that:
    select *  from  SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceId = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.ProdID = "{63F6DCD6-0D5C-4A07-B27C-3AE3E809D6E0}"
    and SMS_G_System_ADD_REMOVE_PROGRAMS.ProdID = "{2AFFFDD7-ED85-4A90-8C52-5DA9EBDC9B8F}"
    When I choose one of them, then it finds workstations. Where is my mistake or I need to do it another way?
    Best regards
    Ronald

    Hello Ronald,
    your Question is important for me because, i search for an possibility to Install the DB2 Client over SCCM environment. My way is over an Command file:
    @echo off
    net use s: \\xxxxxxxxx\d$\SoftwareDeployment\DB2_Driver /PERSISTENT:NO
    s:
    setup -u PROD_CLIENT.rsp
    timeout /T 600 /nobreak
    net use s: /delete
    But the Installation should not start, after some hours it failured with message ID 10006 and comment 1603.Do you know why it not start?

  • Collection based query based on domain

    Hello Everyone, 
    I am having a problem creating a custom collection in my SCCM enviornment
    I want query based collection All Windows Operating
    Systems  except one domain ( In our environment we have 20 domain , in this  i need to exclude one domain)
    Could you help anyone to get this please

    Understood Jeremy,
    Do you have sub domains under the one you want to exclude?
    Like sub.exclude.com under exclude.com?
    We don't have child domain on this.
    In our environment total 20000 machines are there. On the domain excluding having 9000 machines. 
    while I executing with this query i am getting total machines count is 17000 , suppose I have to get around 11000 machines. 
    Please help on this. I have to show my management today, because today is deadline for this. Please help on this 

  • SCCM 2012 R2 client version 1101 and 1104 queries

    There are several samples of collection query code for SCCM 2012 R2 client version 5.00.7958.1000, which is the base R2 client version. Patches can change this to 5.00.7958.1101 and 5.00.7958.1104. But there is a problem. These two patches
    display as 1101 and 1104 when you go to Control Panel\Configuration Manager\General tab but when you go to Programs and Features and look in there the DisplayVersion is 5.00.7958.1000--so all query code samples are unable to different between the base versions
    and version 1101 and 1004. I have been unable to find out how to write a query that finds version s 1101 and 1104. Does anyone know how to do this? Thanks.

    Use ClientVersion from SMS_R_System within a console query or ClientVersion0 from V_R_system in a SQL query.
    Even this can be deceptive though because the agent only reflects the highest version number of one of its subcomponets. This post, specific to 2007, describes the complexity: http://blog.configmgrftw.com/configmgr-client-hotfix-versioning/.
    Specific to your question though, why do you care if either of these hotfixes are distributed to your clients? 2905002 is only necessary during WinPE (and if you are actually not using download on demand content during OSD) and 2910552 is only applicable
    if you are rolling out Win 8.1 using a single TS to your XP systems using a refresh methodology.
    Jason | http://blog.configmgrftw.com

  • How to create a group in SCOM 2012 R2 based on SCCM Collection?

    Is there a way to create a group in SCOM 2012 R2 based on sccm collection? I am planning to use that group for maintenance mode.
    Thanks, Samer

    Hi,
    I think you could query all the collectin members from SCCM database then use powershell to add them to a specific OU.
    How to Create Groups in Operations Manager
    http://technet.microsoft.com/en-us/library/hh298605.aspx
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • SCCM 2012 R2 Empty Query in Collection

    Now, I just discovered yesterday where I created Collection with query but resulted NONE. I know there's no problem with the query itself because I created the same one within the query itself and it give me the result.
    Here's another problem with my CAS & Primary Site SCCM 2012 R2 with CU1:
    1. Created X64 (Servers & Workstations) Collection with membership rules:
    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_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID
    = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.SystemType = "x64-based PC"
    It doesn't give me anything (blank no computer names) even after I refresh the collection.
    BUT, when I created under \Monitoring\Overview\Queries\Results for X64 (Servers & Workstations)
    I could see the result of it.
    Is it my SQL has problem? I'm using SQL 2012 SP1.
    I even updated with CU2 now in Production but it still the same thing. I have no problem with this query above in my test environment.
    Have you come across with this issue? Thanks, Reza
    Reza Prawirasatya

    You might have used a empty limiting collection

  • SCCM 2012 Collection Query

    Hi All,
    I am using SCCM 2012 SP1 with SQL 2008 R2 SP1. I have scenario as below.
    App A is targeted to user based collection as Available (Optional).
    App B needs to be targeted to users who has successfully installed App A as Required(Mandatory).
    Note : As per application behaviour we cannot target App B to machine(Device) based collection, otherwise I would have created a query to pull out all the machines in a collection where App A is successfully installed on base of Add/Remove
    program display name.
    Question : I want to create a user collection query which will pullout last logged on user for all the machines where
    App A is installed successfully, so that I can target App B to this user based collection as Required(Mandatory). In this way if in future any other user is installing App A then that user will also get pulled out automatically to this user
    based collection.
    Its bit urgent for me. Request you please help me to get this query or let me know if there is any other way to achieve this.
    Thanks & Regards Uttam

    Hi Torsten,
    I really have not thought about supersedence but App B is not the upgrade or replacement for App A. If it would then we would have defined the relationship in supersedence. But App A and App B are entirely different applications. Functionality of App B depends
    upon App A, so both has to be there on the machine.
    Only the thing is App B should go to the users who has already installed App A on their machines. For this I would like to create user based collection but confused regarding query. How can we achieve this? I am thinking of to modify the below query
    to pull out last logged on user from the below collection query. I am using SCCM 2012 SP1 with SQL 2008 R2 SP1. How can I modify the below query?
    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 ResourceId in  (select ResourceId from SMS_G_System_ADD_REMOVE_PROGRAMS
    where DisplayName="App A ARP name" and Version = "1.0.0")
    Thanks & Regards Uttam

  • OSD: SCCM 2012 collection which should exclude Windows 7 clients (query not working fine)

    Hi,
    We have an SCCM 2012 collection to which we deploy Windows 7.
    Vista clients get a SCCM 2012 client in SCCM 2007 and once they have it, they get a Windows 7 deployment.
    The group is populated by an AD query and that works fine. However, when we try to exclude Windows 7 machines (query = not Windows NT ... 6.1) the query does not return any result.
    Please advise.
    J.
    Jan Hoedt

    Please check your query. It should be like the following.
    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.Version != "6.1.7601"
    Juke Chou
    TechNet Community Support

Maybe you are looking for

  • Itunes won't let me download my song purchased on other device

    I downloaded a song on my ipad and now I can't get it on my imac. It gives me this message - You can download past purchases on this computer with just one Apple ID every 90 days. This computer can be used with a different Apple ID in 74 days. I am o

  • My ipod touch is connected to the computer but itunes is not recognizing it. help please !

    My ipod touch is connected to the computer but itunes is not recognizing it. I need help please. I've tried restarting both my ipod & the computer and also unistalling itunes and loading it again, nothing is working.

  • XML Datacaching Off doesn't work in IE 7

    In Dreamweaver CS3 (which is running Spry1.4), I tried turning off the XML Data caching and set auto-data refresh to say 5 seconds. I then populated a page with the xml data using the Spry Table. I previewed the page in both IE 7 and FF2 (win) and bo

  • Most native apps crashing after software update

    I did a software update, then tried using iWeb for the first time... I go to publish and crash, I go to open inspector, crash. Now after installing latest quicktime update, mail won't stay running, pretty much everything is falling down around me in

  • Server side SpryDataSets anyone?

    Hello, I'm working on my Spry-it.com project and I was lucky enough that Aptana decided to sponsor my project and donate a Aptana Cloud account to my project. It comes with Aptana Jaxer, it allows you to execute JavaScript and modify the DOM on the s