Hi Jay,
wonder if you can help me?
I have a list of users I want to find the last time they logged in and the computer that was login to. i wonder if you have a powershell script that facilitate this?
Thanks in advance.
find the computer user last login
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
find the computer user last login
Hi Jay,
wonder if you can help me?
I have a list of users I want to find the last time they logged in and the computer that was login to. i wonder if you have a powershell script that facilitate this?
Thanks in advance.
wonder if you can help me?
I have a list of users I want to find the last time they logged in and the computer that was login to. i wonder if you have a powershell script that facilitate this?
Thanks in advance.
find the computer user last login
In a domain the last logn time is held on the domain controllers. Just how toretrieve this depends on the level of the domain.
To find the machine lofgged into you would need to scan the Event log of the DC to find the login event then parse the record to obtain the machine name. This is also subject to domain configuration.
With Vista and later we can use Get-WinEvent. WIth earlier OS versions WMI is probably the best approach.
Look in the script sharing section for examples of reading the event log.
To find the machine lofgged into you would need to scan the Event log of the DC to find the login event then parse the record to obtain the machine name. This is also subject to domain configuration.
With Vista and later we can use Get-WinEvent. WIth earlier OS versions WMI is probably the best approach.
Look in the script sharing section for examples of reading the event log.