Get-QADUser -LDAPFilter help

The script runs, however it only outputs the first filter and not the 2nd.

Get-QADUser -Service "server1" -ldapfilter "(|(extensionAttribute6=*UK*)(extensionAttribute=NL*))" -includedproperties * `` `| select  sAMAccountName, UserAccountControl, DistinguishedName, EmployeeType, DisplayName, Office, Description, Manager, PasswordNeverExpires, lastLogonTimestamp, logonCount, whenCreated, PasswordLastSet, Company, BusinessUnit, Division, Department, extensionAttribute6, UserPrincipalName, userWorkstations, CanonicalName `` `| export-csv -path 'Y:\PowerShell\Exports\Export-Test.csv' -NoType`

I’m trying to export all AD accounts with an extensionAttribute6 that contains either UK or NL.

Anyone able to assist please?

I feel like such a fool! I just noticed that it’s not working due to a typo! The 2nd filter didn’t have the 6 on the end of extensionAttribute!! Doh!!

Tim,
Welcome to the forum. :wave:t4:

We all have been there more than once. :wink:

Thanks for sharing the solution anyway. :+1:t4: :slightly_smiling_face: