AD

Active Directory Clear AdminCount

1st April 2022

PingCastle or another Domain health/security tool may tell you that an account isn’t administrator but it has the adminCount set to a number larger than 0. here is how to…

📌
0💬 read more

Useful PowerShell commands

24th June 2020

List AD users that haven’t logged on in 30 days Import-Module activedirectory Get-ADUser -Filter {Enabled -eq $TRUE} -SearchBase $OU -Properties Name,SamAccountName,LastLogonDate | Where {($_.LastLogonDate -lt (Get-Date).AddDays(-30)) -and ($_.LastLogonDate -ne $NULL)}…

📌
0💬 read more