Lansweeper logo
Home Download Features Demo Buy now Help Support forum
 
    Most requested support articles:
  Lansweeper troubleshooting guide.
  The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
  WMI Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
  How to configure the windows firewall using group policies.
  Support:  
 support@lansweeper.com  
Skype: Lansweeper  
  Mo-Fri 9h-17h CET  
Welcome Guest Search | Active Topics | Log In | Register

Tag as favorite
Active Computers and Top User
Arv2816
#1 Posted : Thursday, July 28, 2011 11:48:58 PM
Rank: Freeware user

Groups: Member
Posts: 3
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.
Lansweeper
#2 Posted : Friday, July 29, 2011 4:22:30 PM

Rank: Administration

Groups: Administration, Premium Users
Posts: 10,379
What exactly is your definition of the "top user"?
Arv2816
#3 Posted : Saturday, July 30, 2011 4:21:03 AM
Rank: Freeware user

Groups: Member
Posts: 3
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.
Lansweeper
#4 Posted : Tuesday, August 02, 2011 11:08:26 AM

Rank: Administration

Groups: Administration, Premium Users
Posts: 10,379
Can you try this one:

Quote:
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
Arv2816
#5 Posted : Thursday, November 10, 2011 9:55:08 PM
Rank: Freeware user

Groups: Member
Posts: 3
Sorry for the slow response. This worked great! Thank you very much.
Users browsing this topic
Guest
Tag as favorite
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Contact: E-mail Lansweeper - Skype : Lansweeper
Copyright 2004 - 2011 © Hemoco bvba