Jump to content


  • 0
UserInterface

Computername, UID, Last Login Time

Question

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..

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

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.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

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

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.