Wednesday, May 15, 2013

Last time a computer authenticated to domain

Objective: Needed to know when a computer has last logged on to the domain? I basically want to clean up a load of old computer accounts in AD.

Solution: "dsquery computer -inactive 24 -limit 0 >>C:\Lastlogon.txt"

Note: 24 being the number of weeks not logged into, and pipe the result to the C drive location.

1 comment:

  1. They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. See the link below for more info.


    #obtain
    www.ufgop.org

    ReplyDelete