Don,

That helps with that part, but here's what I'm trying to get to:

Primary SMTP address, First Name, Last Name, Secondary smtp address

In one report/csv/whatever.


Joe Heaton
Enterprise Server Support
CA Department of Fish and Wildlife
1807 13th Street, Suite 201
Sacramento, CA  95811
Desk:  (916) 323-1284

From: Don Guyer [mailto:dgu...@che.org]
Sent: Friday, April 19, 2013 10:34 AM
To: Heaton, Joseph@Wildlife; NT System Admin Issues
Subject: RE: Need to create a csv through Powershell/Exchange Shell

Get-Mailbox -ResultSize Unlimited | Where {$_.PrimarySmtpAddress -like 
"*@company.org<mailto:*@company.org>"} | Format-Table Name, PrimarySmtpAddress 
| Out-File C:\filename.Csv


Regards,

Don Guyer
Catholic Health East - Information Technology
Enterprise Directory & Messaging Services
3805 West Chester Pike, Suite 100, Newtown Square, Pa  19073
email: dgu...@che.org<mailto:dgu...@che.org>
Office:  610.550.3595 | Cell: 610.955.6528 | Fax: 610.271.9440
For immediate assistance, please open a Service Desk ticket or call the 
helpdesk @ 610-492-3839.
[Description: Description: Description: InfoService-Logo240]

From: Heaton, Joseph@Wildlife [mailto:joseph.hea...@wildlife.ca.gov]
Sent: Friday, April 19, 2013 1:26 PM
To: NT System Admin Issues
Subject: RE: Need to create a csv through Powershell/Exchange Shell

Did you mean How do I know which ones are the right ones?  If so, because I set 
it all up.  There's our "old" address, 
fl...@dfg.ca.gov<mailto:flast@dfg.cagov>, then there's the new address, 
first.l...@wildlife.ca.gov<mailto:first.l...@wildlife.ca.gov>.  Then the temp 
one is fl...@exch.dfg.ca.gov<mailto:fl...@exch.dfg.ca.gov>.

I need to gather the old and the new, not the temp.

Joe Heaton
Enterprise Server Support
CA Department of Fish and Wildlife
1807 13th Street, Suite 201
Sacramento, CA  95811
Desk:  (916) 323-1284

From: Michael B. Smith [mailto:mich...@smithcons.com]
Sent: Thursday, April 18, 2013 5:41 PM
To: Heaton, Joseph@Wildlife; NT System Admin Issues
Subject: RE: Need to create a csv through Powershell/Exchange Shell

Then you will need to use a function or a filter to select the proper email 
addresses.

Who do you know which ones are the right ones?

From: Heaton, Joseph@Wildlife [mailto:joseph.hea...@wildlife.ca.gov]
Sent: Thursday, April 18, 2013 4:10 PM
To: NT System Admin Issues
Subject: RE: Need to create a csv through Powershell/Exchange Shell

The class is:

Automate Windows Server Administration with Powershell 2.0                 
Microsoft course #: 10325

We have a training facility here, called IS Inc.


Here's what I've found so far:

Get-Mailbox -ResultSize Unlimited | Select Name -expandemailaddresses | select 
SmtpAddress

Unfortunately, that just lists everyone's e-mail addresses; all of them.  We 
have a temp address as well as the new and old addresses.  The temp address 
allows the old Groupwise system to forward mail over to the new Exchange 
mailbox.

The attributes I've found that I "could" use, if I go through AD, vs. Exchange:

givenName - first name
mail - e-mail address (primary, but this field is not filled out for everyone.  
It gets filled out properly when the user is migrated to Exchange)
sn - Last name

proxyAddresses - gives me all e-mail addresses, but this will include addresses 
that I don't want, as well as those that I do.


Joe Heaton
Enterprise Server Support
CA Department of Fish and Wildlife
1807 13th Street, Suite 201
Sacramento, CA  95811
Desk:  (916) 323-1284

From: Candee [mailto:can...@gmail.com]
Sent: Thursday, April 18, 2013 4:37 AM
To: Heaton, Joseph@Wildlife; NT System Admin Issues
Subject: Re: Need to create a csv through Powershell/Exchange Shell

You can list all smtp addresses - will that work for you?
I haven't tested it; but I found this.
What class are you going to? I'm looking for live classroom training, but it's 
difficult to find.

http://dxpetti.com/blog/?p=175

Get-Mailbox -Database "Mailserver\Databasename" -ResultSize Unlimited 
|Select-Object DisplayName,ServerName,PrimarySmtpAddress, 
@{Name="EmailAddresses";Expression={$_EmailAddresses |Where-Object 
{$_.PrefixString -ceq "smtp"} | ForEach-Object {$_.SmtpAddress}}} | Export-Csv 
c:\mailbox_alias.csv

On Wed, Apr 17, 2013 at 6:19 PM, Heaton, Joseph@Wildlife 
<joseph.hea...@wildlife.ca.gov<mailto:joseph.hea...@wildlife.ca.gov>> wrote:
I need the following information for all users in my organization:

Primary SMTP address, First Name, Last Name, Secondary smtp address

Now, I know I can get primary smtp address through Exchange Shell, but that 
looks like all I can get there.

I see that I can use the mail field in AD, but that's a field that will be 
inaccurate for a lot of my folks, since not everyone has been migrated to 
Exchange yet, so that field is either blank, or reflects their old e-mail 
address.  I know that I can also get givenName for first name, and sn for last 
name.  The secondary smtp is where I am lost, as proxyAddresses lists all smtp 
addresses, which includes a temp address for the migration efforts, in addition 
to the two that I do want.


Anyone have ideas?

I am going to a Powershell class next month, so hopefully some of that helps me 
get on track with Powershell.

Thanks,

Joe Heaton
Enterprise Server Support
CA Department of Fish and Wildlife
1807 13th Street, Suite 201
Sacramento, CA  95811
Desk:  (916) 323-1284<tel:%28916%29%20323-1284>


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/<http://lyris.sunbelt-softwarecom/read/my_forums/>
or send an email to 
listmanager@lyris.sunbeltsoftwarecom<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

Confidentiality Notice:
This e-mail, including any attachments is the
property of Catholic Health East and is intended
for the sole use of the intended recipient(s).
It may contain information that is privileged and
confidential.  Any unauthorized review, use,
disclosure, or distribution is prohibited. If you are
not the intended recipient, please delete this message, and
reply to the sender regarding the error in a separate email.


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

<<inline: image001.jpg>>

Reply via email to