For example, you want to search through Active Directory for all users that contain the keyword “test
” in the name.
To perform this search we can use Powershell, Active Directory Users and Computers admin console (dsa.msc) or the Active Directory admin center (dsac.exe).
Easiest way is powershell,
start Powershell
#import powershell module
Import-Module ActiveDirectory
#search user using wildcard
Get-ADUser -Filter {name -like "*test*"} -Properties Description,info | Select Name,samaccountname,Description,info | Sort Name
#search computer using wildcard
Get-ADComputer -Filter {name -like "*test*"} -Properties Description,info | Select Name,samaccountname,Description,info | Sort Name
#search groups using wildcard
Get-ADGroup -Filter {name -like "*test*"} -Properties Description,info | Select Name,samaccountname,Description,info | Sort Name
#search object using wildcard
Get-ADObject -Filter {name -like "*test*"} -Properties Description,info | Select Name,samaccountname,Description,info | Sort Name
Start the ADUC console or type dsa.msc end press enter.
Open Find and choose custom Search.
then select the advanced tab and type “name=*test*”
LDAP queries can also be executed via Active Directory Admin Center.
Select Global Search and switch to Convert to LDAP mode.
Enter your query in the LDAP query.