Get-ADObject -LDAPFilter country string not working

Viewed 62

This is what I've been using to filter by city and it works flawlessly

>>  Get-ADObject -LDAPFilter "(l=*Australia*)" |
>>  Where { $_.ObjectClass -eq 'user' } |
>>  Get-ADUser -Properties Title, Department, DistinguishedName, DisplayName, Manager, enabled, Description, EmailAddres
s, LastLogonDate |
>>  Select Name, DisplayName, EmailAddress, Title, Department, Description, DistinguishedName, Manager, enabled, LastLogonDate |
>>  Export-CSV -Path D:\result.csv -NoTypeInformation

However, when I switch city (l) to country (co), I get AD accounts in my csv file that don't even have countries, which is pretty bizarre. What am I missing?

0 Answers
Related