myITforum and Windows IT Pro Forums

 WQL for getting systems where last logon user is particular value for 'office' attribute

Author Message
SylvainV

  • Total Posts : 3
  • Scores: 0
  • Reward points : 1310
  • Joined: 3/21/2014
  • Status: offline
WQL for getting systems where last logon user is particular value for 'office' attribute Friday, March 21, 2014 10:02 AM (permalink)
0
I need to make a membership rule for a device collection in System Center Configuration Manager 2012 R2, using WQL. I want to get all the devices where the last logon user has a given value for the 'office' AD attribute. I'm stuck.
 
The best I can do is get the last logon user from a computer with this query I made:







1 select * from SMS_R_System inner join






2 SMS_G_System_COMPUTER_SYSTEM on






3 SMS_G_System_COMPUTER_SYSTEM.ResourceId =






4 SMS_R_System.ResourceId where






5 SMS_G_System_COMPUTER_SYSTEM.UserName = "INTRANET\\svanste"




But what i would like to accomplish, is to get the computers where the ActiveDirectory 'office'-attribute from the last logonuser is a particular value. 


 
#1
    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 2 guests.

    Icon Legend and Permission

    • New Messages
    • No New Messages
    • Hot Topic w/ New Messages
    • Hot Topic w/o New Messages
    • Locked w/ New Messages
    • Locked w/o New Messages
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2014 ASPPlayground.NET Forum Version 3.9