User Tools

Site Tools


networking:windows:active_directory:stale_computer_accts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
networking:windows:active_directory:stale_computer_accts [2015/09/10 11:37]
gcooper created
networking:windows:active_directory:stale_computer_accts [2022/10/12 09:34] (current)
gcooper
Line 1: Line 1:
 ====== Find Stale Active Directory Computer Accounts ====== ====== Find Stale Active Directory Computer Accounts ======
 +
 +
 +===== Not Logged in Recently =====
  
 This command will show computer accounts that have not logged in recently. This command will show computer accounts that have not logged in recently.
Line 8: Line 11:
  
 24 is the number of weeks of inactivity. 24 is the number of weeks of inactivity.
 +
 +===== Find Old Unused AD Computer Accounts =====
 +
 +^Last logon time       |Active Directory computers have an attribute called ''lastLogonTimestamp'' which stores the last time the computer was logged into. |
 +^Computer password age |Active Directory computers have an attribute called ''passwordlastset'' which gets changed automatically every 30 days. |
 +
 +These two commands are mostly complementary and can help identify old or inactive computer accounts for computers that no longer exist.
 +
 +<file>
 +get-adcomputer -filter * -properties passwordlastset | select name, passwordlastset | sort passwordlastset
 +</file>
 +
 +<file>
 +get-adcomputer -filter * -properties lastLogonTimestamp | select name, lastLogonTimestamp | sort lastLogonTimestamp
 +</file>
 +    
 +    
networking/windows/active_directory/stale_computer_accts.1441906640.txt.gz · Last modified: 2015/09/10 11:37 by gcooper