Created
August 17, 2018 12:18
-
-
Save seriald/4c911c9e501d20d828b0134da5436324 to your computer and use it in GitHub Desktop.
Count the number of AD users given an OU
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$OU = Read-Host -Prompt 'Enter the OU' #Example: OU=IMB,OU=HQ,DC=intra,DC=pri | |
(Get-ADUser -filter * -searchbase "$OU").count |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment