We currently have a list of users in a CSV file and they have only provided me with the GivenName and Surname. They would like me to do a search in AD to see if the account exists, and if it does provide the sAMAccountName and Email Address (if one). If the account does not exist write-host Account not found.
I typically use the sAMAccountName with a Write-host saying if the account exists or not but they are requiring a little more information and providing me with different attributes.
Any help would be appreciated!