Solved

Exchange Shell

Posted on 2015-02-05
1
60 Views
Last Modified: 2015-02-05
I have a spread sheet of about 100 users, and on the spread sheet I have the email addresses of the user which corresponds to their principle name. I would like to run a script in exchange shell to import these users into a variable and get their samAccountname, from the email address. I would like this exported to a csv file. Anyone has any idea on how to get this accomplished. Thanks in advance
0
Comment
Question by:timgreen7077
1 Comment
 

Accepted Solution

by:
timgreen7077 earned 0 total points
ID: 40592820
Disregard question, I manage to get this script to work:

$userlist = Import-Csv c:\excel\test.csv
foreach ($user in $userlist) {
$perms += @(get-mailbox -Identity $user.emailaddress)
}
$perms | select displayname, samaccountname | export-csv c:\excel\respond.csv
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Utilizing an array to gracefully append to a list of EmailAddresses
Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
In this video we show how to create a Shared Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Sha…
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now