SCCM 2012 R2: report collection of pc's with their FULL username

Hi,

I 'd need to have a query on a computercollection = pc's and their users.
I have a query which shows computers and their last logged on user but I'd like to have their full AD name.

F.e. now in report: PC1 ALicoln

What I would like to have: PC1 Abraham Licoln

Please advise howto achieve this.

March 24th, 2015 5:51am

What exactly do you need? A (WQL) query or a SQL/SRS report?
Free Windows Admin Tool Kit Click here and download it now
March 24th, 2015 5:59am

What does you query look like now?
March 24th, 2015 6:20am

It's just a simple query limited to the targetted collection:

select SMS_R_System.Name, SMS_R_System.LastLogonUserName from  SMS_R_System

I don't think the AD full name (first name, last name and/or display name) are available within sccm. Not sure if we could make it appear, import it somehow(?)

Free Windows Admin Tool Kit Click here and download it now
March 24th, 2015 6:44am

You would have to join SMS_R_User (join LastLogonUserName to UserName) to get FullUserName
March 24th, 2015 6:54am

Though I marked it as answer, never was able to make it work.
Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2015 8:21am

What I have now is

select SMS_R_System.Name, SMS_R_System.LastLogonUserName from  SMS_R_System

how can I join that with

select SMS_R_User.FullUserName from  SMS_R_User?

April 22nd, 2015 8:35am

Note does Active Directory discovery automatically discover the necessary attributes? It  doesn't seem to discover the DisplayName (it does discover name etc).
Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2015 8:59am

Note does Active Directory discovery automatically discover the necessary attributes? It  doesn't seem to discover the DisplayName (it does discover
April 22nd, 2015 9:42am

Thanks! When I look into a discovered account (SCCM) I cannot see any full name in a users "discovered data". When it is not there, how should sccm then be able to resolve it?

Thanks for the query but how should that translate into my query "select SMS_R_System.Name, SMS_R_System.LastLogonUserName from  SMS_R_System"?

Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2015 9:52am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics