
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2011 01:48 AM
I'm looking for a way to generate a report that will display all active computers and the top user associated with that computer.
At present when I add a user field to the active computer report I get multiple users associated with a machine, how can I get an output that only shows the top user that has logged into a computer. If that is not possible, is there a way to only display the last logged on user?
Any help is greatly appreciated.
At present when I add a user field to the active computer report I get multiple users associated with a machine, how can I get an output that only shows the top user that has logged into a computer. If that is not possible, is there a way to only display the last logged on user?
Any help is greatly appreciated.
Solved! Go to Solution.
Labels:
- Labels:
-
Report Center
1 ACCEPTED SOLUTION

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2011 01:08 PM
Can you try this one:
Select tblComputers.Computername, tblComputers.ComputerUnique,
tblComputers.Domain, tblComputers.Userdomain, tblComputers.Username,
tblADusers.Displayname, Topuser.Domain As TopDomain, Topuser.Username As
TopUsername, tblADusers1.Displayname As TopDisplayname, Topuser.Total
From tblComputers Left Join
tblADusers On tblADusers.Username = tblComputers.Username And
tblADusers.Userdomain = tblComputers.Userdomain Left Join
(Select Top 1 tblCPlogoninfo.Domain, tblCPlogoninfo.Username,
Count(tblCPlogoninfo.ID) As Total
From tblCPlogoninfo
Group By tblCPlogoninfo.Domain, tblCPlogoninfo.Username
Order By Count(tblCPlogoninfo.ID) Desc) Topuser On Topuser.Domain =
tblComputers.Userdomain And Topuser.Username = tblComputers.Username
Left Join
tblADusers tblADusers1 On tblADusers1.Username = Topuser.Username And
tblADusers1.Userdomain = Topuser.Domain
4 REPLIES 4

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2011 10:55 PM
Sorry for the slow response. This worked great! Thank you very much.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2011 01:08 PM
Can you try this one:
Select tblComputers.Computername, tblComputers.ComputerUnique,
tblComputers.Domain, tblComputers.Userdomain, tblComputers.Username,
tblADusers.Displayname, Topuser.Domain As TopDomain, Topuser.Username As
TopUsername, tblADusers1.Displayname As TopDisplayname, Topuser.Total
From tblComputers Left Join
tblADusers On tblADusers.Username = tblComputers.Username And
tblADusers.Userdomain = tblComputers.Userdomain Left Join
(Select Top 1 tblCPlogoninfo.Domain, tblCPlogoninfo.Username,
Count(tblCPlogoninfo.ID) As Total
From tblCPlogoninfo
Group By tblCPlogoninfo.Domain, tblCPlogoninfo.Username
Order By Count(tblCPlogoninfo.ID) Desc) Topuser On Topuser.Domain =
tblComputers.Userdomain And Topuser.Username = tblComputers.Username
Left Join
tblADusers tblADusers1 On tblADusers1.Username = Topuser.Username And
tblADusers1.Userdomain = Topuser.Domain

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-30-2011 06:21 AM
When I say top users, I mean the user account that has the most logons. In SCCM it is referred to as the top console user.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2011 06:22 PM
What exactly is your definition of the "top user"?
