Поиск и отключение неактивных учетных записей пользователей и компьютеров в домене Active Directory с помощью PowerShell и атрибута AD LastLogonTimeStamp https://winitpro.ru/index.php/2017/03/23/find-disable-and-inactive-users-and-computers-in-ad/