I am trying to use Get-AQDUser
to get a summed list of users per country. So far a have this
$Country = Read-Host "Please Enter the country of which you want to see users "
Get-QADUser -ObjectAttributes @{co="$Country"} | ft displayname, co -auto
and this lists the user names perfectly, but not summed. To get them summed i added the following to above
| Measure-Object
This gives me the number of users, but it counts 4 more users than there is. If I search for users in ADUC, it gives me the correct number. I also tried with the .Count
parameter, but this also gives me 4 more users, than there actually are.
And i am searching from the root of our AD.
Any idea, why |measure-object
always gives me 4 users too many?