Helpful Powershell Commands

These are mostly so I dont have to a) remember them or b) scrounge around google looking for them the next time I need them.

List all users, the last date /time they logged in, and whether the account is Disabled or not.

get-aduser -f * -pr lastlogondate | ft samaccountname,LastLogonDate,Enabled -auto

1 comment: