- Scores: 0
- Joined: 3/21/2014
WQL for getting systems where last logon user is particular value for 'office' attribute
Friday, March 21, 2014 10:02 AM
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.
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.