P S
asked on
Need a powershell script to export email address of users from a list of samaccountnames
I've a CSV file with samaccountnames in it. can someone help with a powershell script to get the email address from the CSV file?.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Can you post the Error?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I don't see any issue, the script should work if you are running the code from Exchange Management Shell.
ASKER
Sorry but i wasn' t using Exchange shell. It's AD module Powershell.
Ok.. Then Get-Mailbox wont work, you can use Get-ADuser as mentioned in your comment.. :-)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Question can be closed if @A D doesn't have any further questions..
ASKER
samaccountname
Test1
Test2
Test3
I just need to retrieve email address of each and every username.
Thanks again!!!