0 votes

Hi,

I know there probably better places for this question but since I need to use Get-AdmUser I was wondering if you could help me build a Filter to find all user accounts which have extensionAttribute5 set to 'Employee' and either no EmployeeID or EmployeeID like 'XX9*' or EmployeeID like 'XXX9*'
This filter is an addition to one of our PowerShell scripts we are using within Adaxes to automatically send a report every month but we need to narrow it down

Thanks in advance
Ingemar

by (960 points)

1 Answer

0 votes
by (216k points)
selected by
Best answer

Hello Ingemar,

Here you are:

Get-AdmUser -Filter {(extensionAttribute5 -eq "Employee") -and ((employeeID -notlike "*") -or (employeeID -like "XX9*") -or (employeeID -like "XXX9*"))}
0

that worked, thanks so much. I had the wrong order.

kind regards
Ingemar

Related questions

0 votes
1 answer

This script description says it can find the manager via FullName Distinguished name or Display name. Wondering if we can change it to use employeeID or SamAccountName.

asked Oct 24, 2022 by mightycabal (1.0k points)
0 votes
1 answer

base dn: OU=Users,DC=domain,DC=com then we have sub OU's like OU=Department,OU=Users,DC=domain,DC=com and OU=Site,OU=Department,Dc=domain,dc=com i would like to filter all the users inside base dn.

asked Feb 21, 2023 by dppankib (20 points)
0 votes
1 answer

Hi Guys, Short question. In our organisation we have a buch of the security group that have a specific "class". The class is simple number stored in the ExtensionAttribute1. I'd ... tried to do the something like that with ADSI :cry: Could you please help me?

asked Dec 8, 2014 by axmaster (510 points)
0 votes
1 answer

Hello, I have an LDAP filter on a home page action : (& (objectClass = organizationalUnit) (name = * Users)) But nothing appears When I do the search from the console with my filter, it works: the OU Users * did not directly at the domain root

asked Dec 14, 2011 by mmichard (360 points)
0 votes
1 answer

Hi there, i know the multiple ways of copying the user groups - or all of them within the user creation wizard. I want to copy only a couple of groups ... is it possible to create an approval operation out of an powershellscript? Kind regards, Constantin

asked May 27, 2021 by Constey (190 points)
3,346 questions
3,047 answers
7,772 comments
544,972 users