You can do this by this simple line as long as you have the Quest AD Cmdlets installed.
get-qadcomputer -IncludeAllProperties | Where-Object { $_.lastlogon -lt (get-date).AddDays(-90) }
Quest AD Cmdlets are free to download from http://www.quest.com/powershell/activeroles-server.aspx
Ce commentaire a été supprimé par l'auteur.
RépondreSupprimerThanks for sharing useful PowerShell script which helps to find out inactive computer accounts in active direc tory environment. I tried this active directory cleanup tool ( https://blog.netwrix.com/2018/02/15/the-ten-best-free-active-directory-management-tools/ ) which generates reports on inactive user accounts who never logged and real last logon information of accounts and manage inactive accounts.
RépondreSupprimer