Skip to content

Computername, UID, Last Login Time

Featured Replies

Would anyone please be able to help me with a report that gives me all the computers with there last logged on user and the last logged on time?

 

I am currently using this but it does not tell me the last logged on time..

 

SELECT distinct sys.Netbios_Name0 ComputerName, sys.user_name0,ipsub.IP_Subnets0, ip.defaultIPGateway0, sys.AD_site_name0 ADSite
from v_R_system sys inner join v_GS_Network_Adapter_Configur IP on sys.ResourceID=IP.ResourceID inner join v_RA_System_IPSubnets ipsub on sys.ResourceID=ipsub.ResourceID
where sys.resource_domain_or_workgr0 = 'AUASCARLSON' and sys.obsolete0=0 and ip.defaultIPGateway0 is not NULL and ipsub.IP_Subnets0 is not NULL;

It is not that important that the last logged on user be extremely up to date as this is to find machines where someone has left and a new user has the laptop so they most likely have been using it for a month or so..

What you have there already list the last user logon as of the last heartbeat. The only way to add last time a user used the console is to add System Console User to the query. This complicates the query as the view needs to be enable first (AI class) and most PC will have more than 1 user listed. To get it to one line/pc is not a simple task.

  • Author

OK, sounds like it's way above my skill level.. I will just have to deal with it..

When you say as of the last heart beat, what heart beat is that? i Just want to make sure that it is up to date before I run the report, and I know the other admin disabled a few of these...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.