POSH 1-Liners: Count the number of enabled Active Directory accounts in PowerShell
-
(get-aduser -filter *|where {$_.enabled -eq “True”}).count Handy! Also – another useful post to create a load of valid-looking AD accounts for your lab.. http://www.wictorwilen.se/how-to-use-powershell-to-populate-active-directory-with-plenty-enough-users-for-sharepoint
https://vinf.net/2018/10/20/posh-1-liners-count-the-number-of-enabled-active-directory-accounts-in-powershell/
© Lightnetics 2024