Friday, December 19, 2008

Addtional AD attributes

If you want to pull additional AD information you simply need to add the AD attribute to the Discovery Agent. Below is an example of adding additional information.

User Discovery

Add department
Add title
Add lastloggedin

Now you can force a User Discovery or wait for the next round. Below is a query that you can use add to the Query Node and show computers and user information. The trick is that you need to create the query with instead of User or Resourse. Like other queries you will not have a right click function because it contains tables other than SMS_R_System.xxxxxx

select SMS_R_System.LastLogonUserName,SMS_R_System.Name, SMS_G_System_COMPUTER_SYSTEM.UserName,SMS_R_User.title , sms_r_user.department from SMS_R_System inner join SMS_R_User on SMS_R_User.Username= SMS_R_System.LastLogonUserName inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId