Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $OU="ou=Users,dc=domain,dc=dom"
- #$SS="OneLevel"
- $SS="SubTree"
- Write-Host "All Accounts:"
- (Get-ADUser -SearchBase $OU -SearchScope $SS -filter *).count
- Write-Host "Enabled Accounts:"
- (Get-ADUser -SearchBase $OU -SearchScope $SS -filter *|where {$_.enabled -eq "True"}).count
- Write-Host "Disabled Accounts:"
- (Get-ADUser -SearchBase $OU -SearchScope $SS -filter *|where {$_.enabled -ne "False"}).count
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement