Determining a User's Last Logon Time

Hello,

I'm trying to generate report for all users last time they logged on to the domain controller. Is there any script or command to find out.

Regards,

June 24th, 2015 6:49pm

yes - look in Script Gallery.

Free Windows Admin Tool Kit Click here and download it now
June 24th, 2015 7:59pm

Hi Dns resolvation,

You can alsp start from this script to query last logon time via the System.DirectoryServices.DirectorySearcher object:

https://gallery.technet.microsoft.com/scriptcenter/Get-Active-Directory-user-246f17c7

If there is anything else regarding this issue, please feel free to post back.

Best Regards,

Anna Wang

July 2nd, 2015 4:49am

Hi

I use the lastlogontimestamp & the quest powershell AD cmdlets

http://software.dell.com/products/activeroles-server/powershell.aspx

add-PSSnapin quest.activeroles.admanagement Get-QADUser -SizeLimit 0 -SearchRoot 'ou.domainname' -IncludedProperties SamAccountName,lastlogontimestamp |

select-object SamAccountName,lastlogontimestamp |

Out-GridView

Regards

Steve

Free Windows Admin Tool Kit Click here and download it now
July 2nd, 2015 7:02am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics