PowerShell ile Active Directory 30 gunluk Inactive user raporu (tr-TR)

Steel Contributor

Active Directory yapınızdaki inactive userları görüntülemek, AD DS yapınızda inaktif durumda bulunan disable duruma getirilmiş kullancıları hiç giriş yapmayan kullanıcılar ile birlikte listeleyebilirsiniz.

 

Örneğin 30 gün geriye dönük olarak bir kontrol gerçekleştirelim disable ve hiç login olmamuş kullanıcları listeliyelim.

 

Search-ADAccount -AccountInactive -UsersOnly -TimeSpan 30.00:00:00

Komut Çıktısı

PS C:\Users\emreozanmemis> Search-ADAccount -AccountInactive -UsersOnly -TimeSpan 30.00:00:00
 
 
AccountExpirationDate :
DistinguishedName     : CN=Guest,CN=Users,DC=1web1medya,DC=com
Enabled               : False
LastLogonDate         :
LockedOut             : False
Name                  : Guest
ObjectClass           : user
ObjectGUID            : f5bf82ef-6046-40ba-9fa8-80a80924e178
PasswordExpired       : False
PasswordNeverExpires  : True
SamAccountName        : Guest
SID                   : S-1-5-21-1346884540-3007984453-3019941278-501
UserPrincipalName     :
 
AccountExpirationDate :
DistinguishedName     : CN=krbtgt,CN=Users,DC=1web1medya,DC=com
Enabled               : False
LastLogonDate         :
LockedOut             : False
Name                  : krbtgt
ObjectClass           : user
ObjectGUID            : fe388b38-b8c5-42df-8cba-1d9e3a218006
PasswordExpired       : True
PasswordNeverExpires  : False
SamAccountName        : krbtgt
SID                   : S-1-5-21-1346884540-3007984453-3019941278-502
UserPrincipalName     :
 
AccountExpirationDate :
DistinguishedName     : CN=test,CN=Users,DC=1web1medya,DC=com
Enabled               : False
LastLogonDate         : 9/3/2021 7:19:27 AM
LockedOut             : False
Name                  : test
ObjectClass           : user
ObjectGUID            : 6a58a091-bf06-486b-8579-2ed0d9e289d2
PasswordExpired       : True
PasswordNeverExpires  : False
SamAccountName        : test
SID                   : S-1-5-21-1346884540-3007984453-3019941278-1104
UserPrincipalName     : Email address removed
 
AccountExpirationDate :
DistinguishedName     : CN=testemre,CN=Users,DC=1web1medya,DC=com
Enabled               : True
LastLogonDate         :
LockedOut             : False
Name                  : testemre
ObjectClass           : user
ObjectGUID            : 26e11b8f-ee01-4983-ace7-2879de3af9ea
PasswordExpired       : False
PasswordNeverExpires  : True
SamAccountName        : emre
SID                   : S-1-5-21-1346884540-3007984453-3019941278-1107
UserPrincipalName     : Email address removed
 
AccountExpirationDate :
DistinguishedName     : CN=test2,CN=Users,DC=1web1medya,DC=com
Enabled               : True
LastLogonDate         :
LockedOut             : False
Name                  : test2
ObjectClass           : user
ObjectGUID            : a3853bd3-a800-40cf-b7aa-8537c78e62b4
PasswordExpired       : False
PasswordNeverExpires  : True
SamAccountName        : test2
SID                   : S-1-5-21-1346884540-3007984453-3019941278-1112
UserPrincipalName     : Email address removed

 

Komut bizim için tüm inactive kullancıuları listeledi burda dikkat edilmesi gereken enabled statüsünün durumu ture ise kullanıcı aktif ancak hiç kullanılmamış false ise bu kullanıcı disable edilmiş anlamına gelmektedir. Ayrıca kullancıı üzerindeki password sürecininde bilgisini, SAM account bilgisinide görüntüleyebilirsiniz.

0 Replies