Tuesday, 14 October 2014

PowerShell: Export Computer Accounts with Last Account Password Change

When looking for machines sometimes it is nice to know if they have even talked to the domain recently. Here is some quick PowerShell to get you on your way.

Get-ADComputer -Filter 'ObjectClass -eq "Computer"' -Properties PasswordLastSet | FT Name,PasswordLastSet > output.txt

FYI: Make sure to install the Active Directory Module for PowerShell

No comments:

Post a Comment