Solved

Export Exchange emails to CSV and Download attachment in powershell

Posted on 2014-01-27
3
388 Views
Last Modified: 2014-10-25
Hi,

Does anyone know how to
1. Export emails to csv via Powershell directly from exchange
2. Export the attachments to a folder via Powershell directly from exchange

I can do it on powershell through outlook but not directly via exchange. I could save a lot of money on licenses!

Here is the function I used to list emails via outlook

Function Get-Outlookinbox
{
 Add-type -assembly "Microsoft.Office.Interop.Outlook" | out-null
 $olFolders = "Microsoft.Office.Interop.Outlook.olDefaultFolders" -as [type] 
 $outlook = new-object -comobject outlook.application
 $namespace = $outlook.GetNameSpace("MAPI")
 $folder = $namespace.getDefaultFolder($olFolders::olFolderInBox)
 $folder.items | 
 Select-Object -Property Subject, ReceivedTime, Importance, SenderName
 }
Get-OutlookInBox

Open in new window


Thanks!
0
Comment
Question by:Evolution-Recruitment
3 Comments
 
LVL 68

Accepted Solution

by:
Qlemo earned 500 total points
ID: 39812734
AFAIK you can't. You can move or copy mails between mailboxes and mailbox folders, or to PST files, but nothing else.
0

Featured Post

Do email signature updates give you a headache?

Constantly trying to correctly format email signatures? Spending all of your time at every user’s desk to make updates? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today!

Join & Write a Comment

Utilizing an array to gracefully append to a list of EmailAddresses
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
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…
how to add IIS SMTP to handle application/Scanner relays into office 365.

706 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

13 Experts available now in Live!

Get 1:1 Help Now