This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Last revision Both sides next revision | ||
windows:proc:active_directory_user_and_computer_audit [2023/02/16 15:43] tschulz |
windows:proc:active_directory_user_and_computer_audit [2023/02/16 15:48] tschulz [Users] |
||
---|---|---|---|
Line 2: | Line 2: | ||
===== Users ===== | ===== Users ===== | ||
- | <code>Get-ADUser -Filter * -Properties “LastLogonDate” | export-csv -path ad-user1.csv | + | - Run the following in a **administrtor Powershell:**<code>Get-ADUser -Filter * -Properties “LastLogonDate” | export-csv -path ad-user1.csv</code> |
- | + | - Open in Excel and sort by LastLogonDate Ascending | |
- | Disable-ADAccount -Identity year_book</code> | + | - Consider removing accounts that are inactive for over a year |
+ | - Make a script with the following: <code>Disable-ADAccount -Identity <SamAccountName></code> | ||
===== Comptuers ===== | ===== Comptuers ===== | ||
<code> | <code> |