Hey so i was wondering i created a ActivedirectoryTool where i can disable users etc. but i need to search for there User logon pre windows 2000 and i dont want that, i want to search for there First name or Last name so its easier for other users to search. I have created an API Endpoint that gets called from the apps page like this:

Is there any way that i could change this code and make it so that i can search with Frist and Last name?
77699cfe3180ea1d901bf1bc75aa4b9c26cec9b7.png
144ed20d1f4c3144e2cbe0a796b392ce247320d1.png
You should be able to use filters to use other properties in your user lookup.
Get-ADUser -Filter "GivenName -like '$UserName*' -or Surname -like '$UserName*'"
Adam Driscoll
PowerShell Expert and Developer at Devolutions