Jump to content


ingram59

Need a query to show computers and logins (not last logged in user)

Recommended Posts

I've read prior solutions to find the "last logged in user". That's not what I need here. I'm needing to build a query in SCCM (if possible) that will show me all the computers that specific ID's have been logged in to, where I provide those user id's I DON'T simply need the Last Login information. I need to show all the machines that the users were logged in to. I don't need their login dates and times. I just need to return all the computer names for the user id's in question.

 

Is there a way to do this using SCCM Queries? There are four id's that I'm targeting. Thanks in advance for your assistance

Share this post


Link to post
Share on other sites

If you have user AI enabled this will do the trick.

 

select

CS.Name0,

SCU.LastConsoleUse0

from

dbo.v_GS_COMPUTER_SYSTEM CS

join dbo.v_GS_SYSTEM_CONSOLE_USER SCU on CS.ResourceID = SCU.ResourceID

where

SCU.SystemConsoleUser0 = <Userid>

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
Reply to this topic...

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