Jump to content

Search the Community

Showing results for tags 'query'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Cloud
    • Azure
    • Microsoft Intune
    • Office 365
    • Windows 365
  • General Stuff
    • General Chat
    • Events
    • Site News
    • Windows News
    • Suggestion box
    • Jobs
  • MDT, SMS, SCCM, Current Branch &Technical Preview
    • How do I ?
    • Microsoft Deployment Toolkit (MDT)
    • Official Forum Supporters
    • SMS 2003
    • Configuration Manager 2007
    • Configuration Manager 2012
    • System Center Configuration Manager (Current Branch)
    • Packaging
    • scripting
    • Endpoint Protection
  • Windows Client
    • how do I ?
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows Vista
    • Windows XP
    • windows screenshots
  • Windows Server
    • Active Directory
    • Microsoft SQL Server
    • System Center Operations Manager
    • KMS
    • Windows Deployment Services
    • NAP
    • Failover Clustering
    • PKI
    • Windows Server 2008
    • Windows Server 2012
    • Windows Server 2016
    • Windows Server 2019
    • Hyper V
    • Exchange
    • IIS/apache/web server
    • System Center Data Protection Manager
    • System Center Service Manager
    • System Center App Controller
    • System Center Virtual Machine Manager
    • System Center Orchestrator
    • Lync
    • Application Virtualization
    • Sharepoint
    • WSUS

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







  1. Good morning, I have printers set for inventory on my SCCM 2012 environment. I need to run a query on all USB/LPT connected printers in the district. Can someone please help me with a query/report or something that I can run that will give me a list of all printer models that have been collected from all my clients? This will help me in collecting drivers while we go forward with our district-wide windows 7 migrations. Many thanks!
  2. Hello. I'm having trouble making up a query for software metering. The query was adopted from some site and then modified to suit my purposes. I am however having problems adding a simple where-clause to this query. The query is as follows: Select SMS_R_System.ResourceID,SMS_R_System.Name,SMS_R_User.UniqueUserName FROM SMS_R_System JOIN SMS_UserMachineRelationship ON SMS_R_System.Name=SMS_UserMachineRelationship.MachineResourceName JOIN SMS_R_User ON SMS_UserMachineRelationship.UniqueUserName=SMS_R_User.UniqueUserName INNER JOIN SMS_G_System_SoftwareFile ON SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceID INNER JOIN SMS_MeteredFiles ON SMS_G_System_SoftwareFile.FileID = SMS_MeteredFiles.MeteredFileID INNER JOIN SMS_MeteredProductRule ON SMS_MeteredProductRule.RuleID = SMS_MeteredFiles.RuleID WHERE SMS_MeteredFiles.RuleID = 16777317 AND DateDiff(day, SMS_G_System_SoftwareFile.ModifiedDate, GetDate()) > 1 AND DateDiff(day, SMS_MeteredProductRule.LastUpdateTime, GetDate()) > 1 AND SMS_R_system.OperatingSystemNameAndVersion LIKE '%Workstation%' AND SMS_G_system_SoftwareFile.ResourceID NOT IN (SELECT DISTINCT SMS_MonthlyUsageSummary.ResourceID FROM SMS_MonthlyUsageSummary INNER JOIN SMS_MeteredFiles ON SMS_MonthlyUsageSummary.FileID = SMS_MeteredFile.MeteredFileID WHERE DateDiff(day, SMS_MonthlyUsageSummary.LastUsage, GetDate()) < 2 AND SMS_MeteredFiles.RuleID = 16777317) This works fine for the purpose, but I want to incorporate device affinity along with it. And to do that, I want to add 'WHERE SMS_UserMachineRelationship.RelationActive = '1'' somewhere but I don't know where. All my guesses have resulted in invalid query. This is for user collection. This was relatively easy to do for device deployments but I'm having hard time getting it to work for when a deployment is for user - and this is essential because the install deployment collection membership must first be deleted before the uninstall can be done.
  3. Hi, I seem to have issues with the queries not returning results (which was returning some 10 seconds before). For example, I have this query select SMS_Package.PackageID, SMS_Package.Name, SMS_Package.Version, SMS_Package.PkgSourcePath, SMS_Package.StoredPkgPath from SMS_Package where SMS_Package.PackageID like ##PRM:SMS_Package.PackageID## order by SMS_Package.PackageID which returns SMS_Package information based on user input in Config MGR. If I enter "%0000A", I get one result. For no reasons not known to me, if I rerun the same query I might not get anything. This behavior happens with all other queries. Is this a known issue, or am I missing something? Thank you
  4. Hi, We are experiencing an issue where some laptops local Group policy (registry.pol) is not updating. Is it possible to produce a report or create a query that looks for a particuliar event ID no.?
  5. I am setting up collections of devices to mimic the OUs setup in AD. Mostly this is for Computer objects. I had found that i can query for Devices in an OU, but I was wondering is there a way to Query a root OU, and have all sub OUs machines included. In the mean time my query has been using the Criterion type as "A List of Values" and I have been adding the root OU, and all sub OUs manually (this is becoming very time consuming). I am worried that down the road when an OU is added, nobody will remember to add the new OU to the machine collection. Any more information needed please let me know.
  6. I am trying to query the computer name and user's department info using one query. If possible, let me know. Thanks
  7. Hi all, Ive run into a potential problem in the organisation. Despite my best efforts to find a solution I cant. I am trying to create a query within a folder - when I try I get the error "A query with this name already exists". We have hundreds of queries within about 50 folders - is there a way to search for the query and for SCCM 2012 to tell me which folder it is located in? PS Im rather new to this SCCM 2012 stuff. Cheers Padhend
  8. hi, is it possible to create a report, that shows me which collection a user or computer is a member of? Best regards Aquintus
  9. Hi All, First apologies if this has come up before. I am currently deploying some updates but before i applied the updates i wanted to find what clients had the particuliar software version installed. The queries worked fine and i have successfully deployed the updates. Now the clients have the latest version of the software the queries should no longer produce the clients as results. But for some reason the queries seem to of not updated. Is there any way to force the query to update the results so it no longer shows these clients?
  10. Is it possible to exclude computers based on an advertisement? I don't want to exclude by collection, though I am contemplating on creating a collection based on each advertisement I do and query an exclusion based on a master collection. For example. I have a Java Advertisement that I need to exclude 10 specific machines from 1,000 machines as the software will not work correctly with their applications. What would be the most streamlined approach in deploying the software to all the machines except those that can't use it. If I can exclude through the advertisement that would be promising (if this is available in 2012 let me know!) rather than making more work by creating a separate collection for each advertisement.
  11. So, I've ran into a bit of a conundrum. I have a large amount of domin-joined devices populated and organized in AD. I want to break them up for specific software deployments by further separating them using Device Collections in SCCM 2012. I use System Resource > System OU Name to break them down into generalized collections, but often times need to break them down further by either excluding nested OU's or only including devices with specific naming strings. My conundrum is this: When creating a query that only lists machines with a specific name string I get no results listed in the collection (see example 1). Additionally, I can't seem to write a query that excludes nested OU's (see example 2). EXAMPLE 1: select * from SMS_R_System inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_R_System.SystemOUName = "DOMAIN/ITS/WORKSTATIONS/SUPPORT" and SMS_G_System_SYSTEM.Name like "%ISSUPPORT%" EXAMPLE 2: select * from SMS_R_System where SMS_R_System.SystemOUName = "DOMAIN/COMPUTER LABS" and SMS_R_System.SystemOUName != "DOMAIN/COMPUTER LABS/CLASSROOMS"
  12. I need to find the following variable (last characters changed) that is located in the registry and need to create a report or collection if any machines have this value in it. What would be the best way of doing this? Has anyone done this before or have any scripts that can pull this information? Would it be easier to create a program to perform a search through the registry and if it's successful to post it's computer name as a text file to a specific open shared folder (not sure if this is possible, sure it is not even sure how to do it just thinking..) Computer\HKEY_Local_Machine\Software\Policies\Microsoft\SystemCertificates\Root\Certificates\AY600DXAIEJANENUEE Thanks,
  13. Hi, I'm wondering if it is possible to pull in only computer objects that are part of a specific Active directory Security group to a collection, and how such a query will look. Has anyone had to do this in the past, and is it possible? Ultimately we would like to separate computers by departments, and our AD access is such that we cannot create new ou's. Thanks. Coenie
  14. I've been tasked with creating a couple of queries and I'm not a SQL coder. If this can be done through the SCCM console, that would be great. I'm not sure how to build these. Query 1: List all computers where a specific user id has been logged on . Query 2: List all users who have logged in to a specific computer. Thanks is advance for the assistance.
  15. Hi guys, I have this 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 SMS_R_System.ResourceId not in (select SMS_R_System.ResourceId 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.DisplayName LIKE "%Avamar%") and SMS_R_System.Client = 1 and SMS_R_SYSTEM.OperatingSystemNameAndVersion like 'Microsoft Windows NT%Server%' In short, it should report back with servers that don't have Avamar installed (not in ARP). The issue is, even though it has filtered many servers that do, I hasn't for all of them. I have RDPed to one of the servers that comes up and in ARP there is an entry 'EMC Avamar for Windows x64 Editions' in the ARP Name field. I entered the server name into the report 'Software registered in Add Remove Programs on a specific computer', and the Display Name shows 'EMC Avamar for Windows x64 Editions'. I also have another collection that checks for servers without Sophos by copying and pasting the query, just changing LIKE "%Avamar%" the LIKE "%Sophos%". The same server doesn't show in the collection as the query has detected Sophos is installed. I can confirm Avamar and Sophos are both installed on this particular server. Thanks, SCCMNoobie.
  16. Hi, Can someone please help me with a query to find a file in a particular location. thank you
  17. Hello I'm having a problem with my patch management colletion queries. We want to make sure that we do not include manually patched servers in our SCCM patch management, and want to control this through a Exclusion group in AD. I'm having a hard time getting the correct results though. I want to include servers in Group A, and I want to remove servers that is included in Group B. The point is to remove servers that is in both groups. As a kind of fail safe. I've gotten this far: 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.SystemGroupName like "Domain\\G_Patch_server_Pilot" and SMS_R_System.ResourceId not in (select ResourceID from SMS_R_System where SMS_R_System.SystemGroupName = "Domain\\G_Patch_server_Exclusions") This gives me the servers in G_Patch_server_Pilot group from the correct domain, but it does not honor the Exclusion groups that is not supposed to be added to the query. If I do the same query with OU's, I get the desired result: 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.SystemOUName like "Domain.com/Machines/Servers" and SMS_R_System.ResourceId not in (select ResourceID from SMS_R_System where SMS_R_System.SystemOUName = "Domain.com/Machines/Servers/Database") This query will exclude the sub OU called Databases. We can not however, base this on OU's as there is different types of servers that need to be excluded. What am I doing wrong here?
  • Create New...