Collection query rule troubles

I am trying to apply criteria to a collection and am having some issues. I have sucsessfully created a query that will group systems by OU membership but also want to filter it by oprerating system IE only show windows XP systems in the collection.
I have tried to add criteria based on operating system version but its just not working..... Below is the 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 inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID
= SMS_R_System.ResourceId where SMS_R_System.SystemOUName = "PLACE.ORG/PLACEHARDWARE/LOCATION/WORKSTATIONS/KIOSKWORKSTATIONS" and SMS_G_System_OPERATING_SYSTEM.Version = "5.1.2600" order by SMS_R_System.Nam
Any suggestions????
tconners

You can also try to create 2 separate collections.  First create a collection that shows all windows xp machines in your environment and validate that you can get that working.  Once you have that collection, create the collection that shows
all machines in the required ou, and for this collection use the windows xp collection as your limiting collection.  This will effectively show you all machines in that ou that are running windows xp.  Sometimes it can be easier to break thing up
into multiple collections and utilize the limiting collection feature or the include and exclude rules, as complex queries can be more difficult to troubleshoot if you have just a single logic or syntax error, and they can be more easily reused in future collections,
such as another collection for another ou, instead of creating a more complex query, you can just create a query for the ou and limit it to the xp collection as well.

Similar Messages

  • Syntax of a query rule to exclude results from site collection

    Hi,
    I'm trying to edit a query rule to exclude results from a site collection.
    I'm coping the "Local SharePoint Results" and want to add something like -path=http://server/sites/demo/*
    but somehow it doesn't work. can someone help with the exact syntax (should to write http, "", to write with {} etc.)
    keren tsur

    -SiteId:<guid>
    should work. Or:
    -path:http://server/sites/sitecollection
    Thanks,
    Mikael Svenson
    Search Enthusiast - SharePoint MVP/MCT/MCPD - If you find an answer useful, please up-vote it.
    http://techmikael.blogspot.com/
    Author of Working with FAST Search Server 2010 for SharePoint

  • Collection Membership Rules - Query returns object, Collection shows no members..?

    Hi All, 
    I'm hoping i have just made a simple error / change and not noticed, however at the moment and not for all Collections, i am having issues with Membership.
    Problem:
    Adding a Computer Object into an AD Group and using a Membership Query (Of the AD Group) to add members to a collection will not work.
    Info:
    I have added a PC to an AD Group "MS Office 2010", forced AD Group Discovery, made a Query and run it to test (Works, shows the member) and added the query to the Membership Rules Tab (Add Rule > Query Rule > Import Query)
    If i then "Update Membership" and/or refresh the collection membership it still does not appear, thus not receiving the software i have advertised to it.
    Any assistance would be greatly appreciated.
    Brandon

    Since this is CM07, it will take a while for new groups to be populated. If I remember right you MUST do the following in the following order.
    Create the group and add members
    Wait for AD replication to happened
    Reboot the computers
    Force AD group discovery to happen
    Force Heartbeat discovery to happen
    Create/ force the collection membership to up
    Run the machine policies
    If you use direct membership rule of the security Group:
    Create the group and add members
    Wait for AD replication to happened
    Force AD group discovery to happen
    Create/ force the collection membership to up
    Reboot the computers (anytime after step 2)
    Machine policies should run automatically
    BTW, in CM12 this process has change and it now take ~2 minutes an applciaiton to show on on the computer.
    Create the group and add members
    Wait for AD replication to happened
    Force AD group discovery to happen
    Create/ force the collection membership to up
    Run the machine policies
    Garth Jones | My blogs: Enhansoft and
    Old Blog site | Twitter:
    @GarthMJ

  • Query rule using query variables

    Hi All,
    I am working on a query rule in SharePoint 2013. I am trying to build a query text using query variables to provide profile based results to the users. The query text which I am using in the query builder is of the following format:
    {SearchBoxQuery} CombinedLanguage:{User.PreferredContentLanguage}
    but its not taking the user.preferredcontentlanguage value. Has any one worked on similar type of query rules using query variables? Please share your suggestions.
    Thanks !!

    Hi,
    As I understand, you cannot get the user.preferredcontentlanguage value.
    1. Make sure you have set the value of query variable {user.preferredcontentlanguage}, it will return -1 if not set.
    2. Make sure you search in the right result source.
    3. Please check the crawled property mapped to the managed property CombinedLanguage and make sure that there is at least one value indexed by the crawled property equal to the {user.preferredcontentlanguage}.
    The article below is about the query variables.
    https://technet.microsoft.com/en-us/library/jj683123.aspx
    The article below is about the different query variables return different result examples.
    http://techmikael.blogspot.in/2014/05/s15e03-query-variables-constant-trouble.html
    Best regards
    Sara Fan
    TechNet Community Support

  • SCCM 2012 RS QUERY RULE OPTIONS

    How do i create a device collection query in SCCM2012 R2 wizard rule to find properties information for server object in Active Directory, such as query for description field?
    Example:

    You must first enable the discovery of this field in "Active Directory System Discovery". See the "Active Directory Attributes" tab.
    (Administration / Hierarchy Configuration / Discovery Methods)
    Once enable, run a synchronization on this component by right clicking on it.
    After the discovery you'll be able to query the "Description" field under "System Resources".
    Or use this WQL query
    "select * from SMS_R_System where SMS_R_System.description = "Your Description Goes Here"
    Benoit Lecours | Blog: System Center Dudes

  • Reporting or Query Rule to get the machines with particular software Update.

    Hello Guys,
    My Device collection has 10 machines, Need to get information whether these machines have
    Service Pack 2 for Microsoft Office 2010 (KB2687455) 32-Bit Edition
    installed,
    Please help me with the query rule or correct reporting to get the information. Since the Updates are
    not listed under Add or Remove programs am not able to use other reporting which i use normally.
    Please assist.

    Are you sure that you don't see the SP in add/remove programs if you click "View installed updates"?
    You should...
    You can use hardware inventory to pick up the info, but you need to enable the Hardware Inventory Class "quick fix engineering (Win32_QuickFixEngineering)" in the client settings.
    Then you can use a query, e.g.
    SELECT
    HotFixID0
    ,Description0
    ,InstalledOn0
    FROM
    v_GS_QUICK_FIX_ENGINEERING

  • Device Collention query rule for registry value

    Hi,
    How do i create a device collection query in SCCM2012 R2 wizard rule to find the criterion type for a regisrty value data type.?
    For example: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanServer\Parameters\srvcomment
    Value name: srvcomment
    Value Data: ABCD

    when you run RegToMof and point to the correct key, there are three tabs, one says ConfigMgr12 another says CnfgMgr07 and SMS2003. You want the ConfMgr12 tab.
    From that tab there are two tabs below that, a configuration.mof tab and a to import in ...... tab
    navigate to the key you want to include
    As you navigate both tabs are populated with data.  You need to copy the contents of the Configuration.mof tab and paste it in your configuration.mof files on your site server, which is located
    C:\Program Files\Microsoft Configuration Manager\inboxes\clifiles.src\hinv
    by default.  Backup the original in case you mess things up.
    The other tab, to import in Admin/Agent settings...., you need to copy the contents of that tab, and created a .mof file (which is just a regular text file), name is whatever.mof.  The go to your config man console, and import the .mof file into your
    agent settings/hardware inventory/set classes (you'll see the button in hardware inventory)

  • Collection query for computers with windows management framework 3.0

    Hi,
    collection query for computers with windows management framework 3.0, but I cant found a way. I cant see that it is in the inventory data for SMS_G_System_ADD_REMOVE_PROGRAMS_64.DisplayName.
    So any way to get computers with windows management framework 3.0?
    /SaiTech

    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_SoftwareProduct on SMS_G_System_SoftwareProduct.ResourceId
    = SMS_R_System.ResourceId where SMS_G_System_SoftwareProduct.ProductName like "Windows Management Framework 3.0%"
    That won't work because as mentioned, it doesn't appear in ARP.
    Torsten's suggestion will work or you can resort to software/hardware inventory using the info at
    http://serverfault.com/questions/555100/methods-to-detect-version-of-windows-management-framework
    Jason | http://blog.configmgrftw.com

  • SCCM collection Query - Wrong output

    Hi 
    We are working on Creating Dynamic SCCM collection which get populated based on following two condition
    1) Belongs to a Test OU in AD
    2) Doesn't have scom agent installed
    We have been trying to work out why following query doesn't populate collection with correct object instead populate by every object that exist in this OU. Seems like condition after AND is totally ignored. is there anything I am doing wrong here
    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_SERVICE on SMS_G_System_SERVICE.ResourceID =
    SMS_R_System.ResourceId where SMS_R_System.SystemOUName = "AD.local/Servers/DEV/Test" and SMS_G_System_SERVICE.DisplayName != "Microsoft Monitoring Agent"
    Where as below query is working and condition after AND is calculated and collection get populated with right objects.
    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_SERVICE on SMS_G_System_SERVICE.ResourceID =
    SMS_R_System.ResourceId where SMS_R_System.SystemOUName = "AD.MONASH.EDU/Managed/Servers/DEV/OCIO/SplunkTest" and SMS_G_System_SERVICE.DisplayName = "Microsoft Monitoring Agent"
    We tried with different combination such as "not like", "is null" etc etc. seems to us that as soon as we try have negative criteria after AND that criteria has been ignored.
    To my little knowledge of SQL query, condition after AND is not optional and has to meet, if it doesn't query should return no value.
    is this same with SCCM collection query? will appreciate if some one can shade some light here.
    Thank you in advance. 

    Thank you All for the reply
    Our End Goal is to be able to automate software/configuration deployment based on criteria we set. SCOM is first of the rank if you like and we want this to be hands off approach so when a server move into certain OU based on criteria server get populated
    into SCCM collection and SCCM pushes out software/configuration packages out to the server.
    but having said that if we have to create two collection to satisfy our two criteria than most likely we will need number of collections depending on numbers and types of criteria. This will make managing collection and their relationship more challenging
    and not sure if that is the path we want to take. This will need to be discussed through unless we find better solution.
    Thank you again

  • How to get SQL statement from (Collection) query.execute();

    We have a JDO Persistence class ClassName that execute query using following code. After this statement get executed, record does not get updated in the DB. Is there a way to check what SQL statement got submitted in the (Collection) query.execute(); ??? <br><br>
    Extent extent = pm.getExtent(ClassName.class, false); <br>
    Query query = null; <br>
    try { <br>
    query = pm.newQuery(extent, filter); <br>
    Collection results = (Collection) query.execute();<br>
    Iterator i = results.iterator();<br>
    if (i.hasNext()) {<br>
    ...<br>
    }<br>

    You can always find out the names of tables that are views, using java.sql.DatabaseMetaData and its getTables() method.
    This tends to be a nice source of examples:
    javaalmanac.com
    However, if you're asking for the underlying SQL used to CREATE VIEW, I don't see anything in the API that will give you that. After all, JDBC shouldn't have to know if it's dealing with an ordinary table or a view. I think you'd have to ask your DBA for the underlying SQL.
    Once you have it, what do you plan to do with it?
    %

  • 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

  • Collection query to get the Linux machines details

     Hi,
    Can I get the collection query to create list of Linux  machines . Please help me to get 

    Hello, I think, you are asking about SCCM collections !??? if yes, kindly post your query no SCCM forums.
    if not, please elaborate your question?
    Devaraj G | Technical solution architect

  • REST API and best bets / query rules

    Is there a bug in this?  I can not get best bet results regardless of the query string.  For example, the following (according to MSDN documentation) should process the query rules and return a best bet.  But it doesnt.  Am I doing something
    wrong in the query?  It only seems to return ordinary results.  Performing the same search via Sharepoint's UI returns the best bet at the top.
    $.ajax({
    url: "http://myserver/sites/mysite/_api/search/query/?processbestbets=true&enablequeryrules=true&querytext='" + searchText + "'",
    type: 'GET',
    headers: {
    "accept": "application/json; odata=verbose"
    success: myCallback,
    error: function(data) {
    alert(data.responseXML.text);

    Hi Scott,
    With EnableQueryRules and ProcessBestBets set to true in the search rest api, we can get the promoted results(best bets) in SharePoint 2013.
    I recommend to type the search rest api URL in the browser directly and then check if the best bets are displayed at the top of the search results.
    It will not displayed inside the table for normal results.
    Please also make sure that the query text matches the query rule condition.
    Thanks,
    Victoria
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • SCCM collection query to create ESX host machines

    Hello Everyone
    I am looking SCCM collection query to create  ESX host collection. Any one can share the query to create EST host machines collection please

    For the actual ESXi hosts you can't.
    For host machines, that would be a query for all virtual servers, like this one:
    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.IsVirtualMachine = "True"
    Make sure you limit the above query to servers collection or you can expand it to include servers, like this:
    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_R_System.IsVirtualMachine = "True" and SMS_G_System_OPERATING_SYSTEM.Caption like "%server%"

  • Device Collections - query for HyperV servers

    Is it possible to devise a Device Collection query that would only list servers running with the HyperV role ?

    select *  from  SMS_R_System inner join SMS_G_System_SERVICE on SMS_G_System_SERVICE.ResourceId = SMS_R_System.ResourceId
    where SMS_G_System_SERVICE.DisplayName = "Hyper-V Virtual Machine Management"
    Cheers
    Paul | sccmentor.wordpress.com

Maybe you are looking for

  • HP Pavilion dv7t-3000 CTO Entertainment Notebook PC motherboard replacement

    Hi, I have an HP Pavilion dv7t-3000 CTO Entertainment Notebook PC with the black screen (of death) due to a known fault with the graphics chip. I have been trying to buy a replacement motherboard at an affordable price that does not have this problem

  • Text variable + text with tabs to align away from spine

    Hello I need a document header that shows the chapter captions. So I created a text variable that picks the format of the caption. But the chapter captions have tabs: I.>Introduction So in the header, on the left pages it looks fine: alignment is "aw

  • Program for call transaction method

    can any body  help  me , how to write a  call transaction method . how to create error logs for call transaction method

  • Best way for authentication?

    Hello, I'm running Oracle 10g Standard on a linux server and I would like to change the authentication method. The server is in an Active Directory. So users who are allowed to access the server can login using their domain account. Until now additio

  • Cmd-Shift-1

    This worked in previous versions as a keyboard shortcut for Top Sites. Does anyone know of a reason why this would be removed in 4.0.4? Thanks. All the best, Tom