My organization has some custom attributes assigned to users. I am able to query on these attributes by selecting the property as well as write to the attribute. What I need to so is be able to have a script check to make sure that the data being provided isn't already assigned to another user and return a warning if there is. I somewhat understand how to do this with SQL but the AD database isn't SQL so not really sure how I can check that information.
This is not complex enough, I need to be able to enter the user name and enter what the value I want it to be. Then it needs to go through and search every user in the AD and make sure that number doesn't exist.