Solved

Exchange Shell

Posted on 2015-02-05
1
63 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

763 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