Quantcast
Viewing all articles
Browse latest Browse all 31638

Trying to locate the last Logged on User of a computer within a domain...

Hello All,

           So far this is what I've come up with

                  dsquery * "OU=Workstations,OU=XXX,OU=XXX,OU=XXX,OU=XXX,DC=XXX,DC=XXX,DC=XXX,DC=XXX" -filter "(&(objectCategory=computer)(objectClass=computer))" -limit 0 -attr sAMAccountName lastLogon operatingSystem

            But I am trying to also add the user who was last logged into these computers, by chance would anyone have an idea as to what I should add to the search critera in order to also display the last logged on user?


Viewing all articles
Browse latest Browse all 31638

Trending Articles