This shows you the differences between two versions of the page.
Next revision Both sides next revision | |||
windows:proc:active_directory_user_and_computer_audit [2023/02/16 15:25] tschulz created |
windows:proc:active_directory_user_and_computer_audit [2023/02/16 15:43] tschulz |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Active Directory User and Computer Audit ====== | ====== Active Directory User and Computer Audit ====== | ||
+ | |||
+ | ===== Users ===== | ||
+ | <code>Get-ADUser -Filter * -Properties “LastLogonDate” | export-csv -path ad-user1.csv | ||
+ | |||
+ | Disable-ADAccount -Identity year_book</code> | ||
+ | ===== Comptuers ===== | ||
+ | <code> | ||
+ | Get-ADComputer -Filter * -Properties LastLogonDate,operatingSystem,operatingSystemVersion,IPv4Address | export-csv -path ad-computers1.csv | ||
+ | |||
+ | Disable-ADAccount -Identity MHESSELAPTOP$ | ||
+ | </code> | ||
+ | |||