In many domain-controlled environments, especially in large companies, "dormant" (unused" user accounts may start to appear. Such accounts' activity should be well-monitored, but first they should be found out.
The simplest way is to use the standard 'dsquery' command-line utility to filter out users by a given criteria. For example, the command
dsquery computer -inactive NumberOfWeeks
where NumberOfWeeks is an integer value. The above example will list all the users that haven't logged in for the specified time interval.
Note that the above assumes you're using Windows Server 2003-level environment. If yours still has Windows 2000 computers in it, or is running in mixed-mode functional level, try this command instead:
dsquery computer -stalepwd NumberOfDays
The simplest way is to use the standard 'dsquery' command-line utility to filter out users by a given criteria. For example, the command
dsquery computer -inactive NumberOfWeeks
where NumberOfWeeks is an integer value. The above example will list all the users that haven't logged in for the specified time interval.
Note that the above assumes you're using Windows Server 2003-level environment. If yours still has Windows 2000 computers in it, or is running in mixed-mode functional level, try this command instead:
dsquery computer -stalepwd NumberOfDays