magritton
10/27/2014 - 6:38 PM

Powershell script gets all active directory users of an OU and produces a count

Powershell script gets all active directory users of an OU and produces a count

Import-Module ActiveDirectory
$cnt = Get-ADUser -Filter * -SearchBase "OU=opw,DC=opwftg,DC=COM"
$cnt.count