Link to home
Start Free TrialLog in
Avatar of Will Szymkowski
Will SzymkowskiFlag for Canada

asked on

Powershell Help

Hello Experts,

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!
ASKER CERTIFIED SOLUTION
Avatar of Jamie McKillop
Jamie McKillop
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Will Szymkowski

ASKER

Thanks for the response. Worked like a charm.

:-D