I have a spreadsheet of a bunch of AD users with the following columns. Column A (First Name) Column B (Last Name) Column C (Email Address). How can i create a script that will -Filter out the email address of each AD Object and give me the SamAccountName property of each user exported back out to a CSV.
I thought it would be
$email = Get-Content -Path c:\users.csv
Get-AdUser -filter -Property EmailAddress
that obviously doesn't work.
So anyway i can provide the emailaddress data point and it spit me back out the samaccountname of all 600 users?
See my previous answer to you for a similar question. Just change the property to the one you want to use.
Powered by IDERA