ingram59 Posted July 23, 2012 Report post Posted July 23, 2012 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. Quote Share this post Link to post Share on other sites More sharing options...
BB24 Posted July 24, 2012 Report post Posted July 24, 2012 You can build the query through the console: For Query 1 Queries - New - Query Provide a name for the query Object Type - System Resource Edit Query Statement... Select Criteria tab Select the New criteria button (golden sparkle) Select... Attribute class dropdown = System Resource Attribute dropdown = Last Logon User Name Value = username <enter> Ok, Finish, Apply.... Alternatively you should be able to use the following WQL: select * from SMS_R_System where SMS_R_System.LastLogonUserName = "username" Replace username with the name of the specific userid (case sensitive). I don't know if you can get Query 2, I'm unsure if SCCM inventories all logons. Might be easier to write a vbs script to capture that information. Quote Share this post Link to post Share on other sites More sharing options...