Exporting mail from specific subfolders only via powershell

I am trying to create a powershell script to export mail from the specified subfolder of the inbox of an exchange 2010 mailbox to a PST.  For example, if Bobs mailbox has a folder in the inbox called salesinfo and this needs to be exported to a PST,
but nothing else in the mailbox should be included, is there a way to do this in PowerSHell?
I have tried new-exportrequest -mailbox bob -includefolders '#inbox#\\salesinfo' -filepath \\server\share\bob.pst
and am getting nowhere fast.  this gets folder structure for somethings out but no mail.... exporting the whole mailbox or even the entire inbox is also no good...
Does anyone know if there might be a way to do this?
thanks much
Derek
Derek Schauland, MCSE, MCTS Active Directory | Microsoft MVP - File System Storage | Author - Training Guide Configuring Windows 8 MS Press | Technology Addict

Hello Derek,
There are parameters that you can use to export specific folders however these days Exchange forums are getting attacked by third party product person so having lack of quality :)
You can use IncludeFolder or ExlcudeFolder switch to choose specific folder or exclude folders that you don't want...
For example for default folder (you can use #defaultfoldername#)... 
New-MailboxExportRequest -Mailbox Kweku -IncludeFolders "#Inbox#" -FilePath \\SERVER01\PSTFileShare\Kweku\LegalHold.pst
If you want to include multiple folders then here is an example...
New-MailboxExportRequest -Mailbox Kweku -IncludeFolders "#Contacts#","rootfoldername/subfoldername"  -FilePath \\SERVER01\PSTFileShare\Kweku\LegalHold.pst
If you want to include all subfolder of a root folder then here is the switch...
-IncludeFolders "rootfoldername/*"
New-MailboxExportRequest - http://technet.microsoft.com/en-us/library/ff607299(v=exchg.141).aspx

Similar Messages

  • Export mail from Mail to pop3 mail

    Is it possible to export mail from Mail to a pop3 webmail account? How to do this?

    knutfin wrote:
    Is it possible to export mail from Mail to a pop3 webmail account? How to do this?
    by forwarding or redirecting all the messages to your webmail email address one by one. that's the only way. the same is true for any other email client you may use. there is no other way to get messages into a webmail pop account.

  • HT2518 How do I export mail from windows xp to my mac? Can I just copy all my windows mail to a USB storage device and plug it into my mac?

    How do I export mail from windows xp to my mac? Can I just copy all my windows mail to a USB storage device and plug it into my mac?

    Select "export' while in Windoz/Outlook and cerate an export file, then while in MacOS/Outlook select "import" and select the same file to import. You can use a thumb drive to sneakernet the file.

  • Exporting mails from Journal Mailbox

    Hi, I am looking to export mails from journal mailbox on 2 parameters 
    1) Mails sent from a certain email address
    2) mails received to a certain address
    but unluckily i am unable to do so when i run the search-mailbox command on the journal mailbox with search criteria of user email address it shows me the count, but when i try to run the export-mailbox command with the -contentfilter option adding the email
    address it does not give me the output in the pst file, the pst file is empty and nothing in it.
    Can someone help me in this to get solve this issue.
    BR/Deepak

    Hi, I am looking to export mails from journal mailbox on 2 parameters 
    1) Mails sent from a certain email address
    2) mails received to a certain address
    but unluckily i am unable to do so when i run the search-mailbox command on the journal mailbox with search criteria of user email address it shows me the count, but when i try to run the export-mailbox command with the -contentfilter option adding the email
    address it does not give me the output in the pst file, the pst file is empty and nothing in it.
    Can someone help me in this to get solve this issue.
    BR/Deepak
    Was able to successfully solve the export problem by below command by adding the contentfilter parameter all -like this gave me all mails sent to this user and received to this user perfectly.
    New-MailboxExportRequest -Mailbox "journalmailbox" -ContentFilter {all -like '[email protected]'} -FilePath "\\server\mailbox.pst"
    BR/Deepak

  • Sending e-mail from specific senders straight to Trash

    Is there a way to flag e-mails from specific senders to go straight to the trash? There are certain senders who constantly send e-mails that I invariably trash. Currently they all go to the Junk mail folder where I have to manually delete them. If I could flag all incoming e-mails form theses senders to go straight to the trash it would be a real help.

    You can configure a rule to check incoming mail and route messages to a destination mailbox of your choice. Open Mail preferences, click on the Rules icon in the toolbar.

  • Remove various accepted domains (exchange 2007) from a list file via powershell

    hello!
    i'm a newbie with powershell and i'm trying to find if is it possible to remove a lot of exchange 2007 accepted domains from a csv file using powershell.
    I want to delete accepted domains contained in a csv, it has only domains name and powershell requires the name , that is different from the domain.
    example of accepted domain in my organization:
    Name                           DomainName                DomainType            Default
    Domain0001        
    domain1.com     Authoritative         False 
    Domain0002 hello1.com
    Authoritative False
    I've only a csv with domains name:
    domain.csv:
    Domain
    domain1.com
    hello1.com
    Deleting an accepted domain via powershell requires the name so I need to extract first the name of , i've tried with this command and it works:
    Get-AcceptedDomain | Where{$_.DomainName -eq 'domain1.com'}
    This works only for 1 domain, I've a lot of domains to delete so it's inviable
    Now, i'm trying to launch this command without success:
    import-csv domain.csv | foreach {Get-AcceptedDomain | Where{$_.DomainName -eq '$_.Domain'}}
    Probably there is a syntax error, or maybe I just can't do it. 
    Any help? 
    Many thanks in advance!!

    Don't know what to tell you, then.  If I create a test file with that data, the Import-CSV works for me:
    Domain
    3414257440.domain.com
    domain1.domain.com
    '@ | set-content c:\testfiles\domain.csv
    $DomainNames =
    Import-CSV 'c:\testfiles\domain.csv' |
    Select -ExpandProperty Domain
    $DomainNames
    3414257440.domain.com
    domain1.domain.com
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • Export mail from outlook 2002 for Entourage 2004 - how to?

    Hi.
    I've tried for some time now to export my mail from outlook 2002 for Entourage.. Can't say it's been easy, and I still haven't figured it out.
    Can anyone help me with this..
    and .. oh yes.. I'm a newbie at mac.. got it for only about a week or so now..
    please bare with me..

    I don't use contacts but I found this document that should help:
    http://docs.info.apple.com/article.html?artnum=302268
    However it does specify Outlook 2003 or later is required to sync contacts so that will be an issue for you.

  • Cannot open mail from specific users

    I forgot to add, in my haste and frustration of 3 days, I uninstalled Office 2010 for the 2nd time and installed Office 2013. Same user, same problem, cannot open his mail...

    Good day
    Hope you can assist.
    I have a Outlook 2010 on Win7 64bit on a HP Probook 450.
    The notebook is on a domain and the user gets his mails of exchange.
    When my user receives new mail from only 2 out of 30 odd users, he cannot open them.
    He gets a error message, Outlook cannot find item.
    But if I go to autodiscover.xxxxxx/owa I can open the mail and reply to it.
    This occurs in cached and non cached mode.
    This happens in normal Outlook and in safemode Outlook.
    I have also uninstalled and reinstalled MS Offcie 2010 which did not help.
    Please advise, I'm going nuts...
    Thank you
    Gideon
    This topic first appeared in the Spiceworks Community

  • Adding a shared mailbox to a user's Outlook profile, who has reviewer rights only, via PowerShell

    Hello Everyone,
    I'm working on trying to create something like a knowledge base for my company, and what I'm trying to accomplish is to create a shared mailbox on 365, add users to have read-only rights to the Inbox (which I can achieve via PowerShell) so they can't delete
    the articles, but it seems that by just adding Reviewer permission to a user, it doesn't force the mailbox to open on the end-user's Outlook profile - it only seems to automatically populate if I go through the exchange admin console and allow Full Access
    through User Delegation. 
    Is there a way, via PowerShell, to open a shared mailbox in a user's Outlook profile?
    Thanks for all the help!

    Hi,
    We can create a PRF file that modifies the existing Outlook profile to add the shared mailbox.
    Please have a look at this thread which discussed a similar issue:
    http://social.technet.microsoft.com/Forums/systemcenter/en-US/374e5a31-1732-45b8-afdd-7c0987e04a7e/how-to-add-additional-mailboxes-in-outlook-for-exchange
    For more information about Customize Outlook profiles by using an Outlook Profile (PRF) file, see:
    http://technet.microsoft.com/en-us/library/cc179062(v=office.14).aspx
    Hope this helps.
    Regards,
    Steve Fan
    TechNet Community Support

  • Advice on SMTP setup for outgoing mail from internal devices only?

    Hello.
    I'm trying to set up a basic SMTP server using OS X Server (10.5.6) so I can have devices (Server Monitor, my UPS power system alerts, router alerts, etc. — all on the local LAN/same subnet) send out mail when they need to send out alerts. These devices do not have the ability to configure SMTP authentication, so I just need to set up this outgoing SMTP server on one of my Xserves so they have a way of sending said mail.
    Would anyone be willing to provide information on how I'd set this up?
    I thought I had it set up correctly, but whenever I try and send a test email (from my mail.app account), I never receive anything at the intended delivery address (an email address hosted by a 3rd party)?
    Thanks!
    Kristin.

    The default mail server configuration should accept mail from local clients and relay it to the destination domain. The only gotcha would be if the mail server thinks it's authoritative for the domain you're sending to (e.g. you're sending to '[email protected]' and this server thinks it is the mail server for 'yourdomain.com'. There are various ways of overcoming this - the easiest of which is to tell the server it's not authoritative for yourdomain.com.
    The mail logs will give you an indication if that's the problem - it'll either say it delivered the mail locally, or that there was some problem connecting to the remote mail server.
    Either way your ISP can't be blocking outgoing SMTP traffic (well, they could, but it would be pretty stupid of them), but your internal traffic shouldn't be touching your ISP's network anyway, which may indicate a configuration problem.

  • Send e-mail from specific user

    Hello!
    I'd like to create two different sending from SAP System - the first is monthly and the second is everyday.
    May I schedule jobs either send mail from concrete SAP Users?
    Otherwise Everyday job also can send preset messages from monthly job...
    SAP Release: NW 2004
    Thanks and Regards,
    A.M.

    Hello A.M.,
    You cannot schedule the job to send emails from specific users. If the send job is configured to run for INT, for example, it will send all emails with status 672 in SOST.
    One thing you can do is to set waiting time in the emails. To do this, go to SOST, select the emails you want to set a wait time and click on the button "Set Wait Time" (it's a clock icon next to the delete button).
    Regards,
    Tiago

  • Problem exporting mail from N8-00 to PC

    Hi
    I want to copy the email to outlook 2007 on my PC.
    How do you export email from the Mail app on the N8-00.  I installed the PC Suite on a Vista PC and it synch'ed contacts but there is no option to sync email.   When you go into the setup area of PC Suite there is no Email tab.  I saw the user gudie which has a crseenshot showing one but I don't know why it is not visible to me.
    It does talk to Outlook as contacts came over successfully.

    DStratton wrote:
    The issue has been that the phone was synched to a yahoo email account and that account was deleted.  As the phone is still showing emails I hoped to download from the phones emails on the phone to retain the names and email address etc of people who had emailed.
    There is an app which looks as if it will do what you want, http://store.ovi.com/search?q=best+messagestorer# but it isn't listed when the store is set to a Belle N8, so it might not be compatible with Belle yet. There is a 15 day trial version at http://www.smartphoneware.com/messagestorer-for-s60-3rd-edition-product.php which while described as for s60 3rd, does include s^3 in the platform list. There may well be other apps available, either in the store or at 3rd party sites, that do a similar job so spending some time searching may be of use.
    If there aren't too many addresses that you want to save, and you can't find an app to do it, you can always save the addresses manually. When viewing the mail on the phone select the "+" icon, then when you select the address you get the option to save to contacts. Once done you'll be able to sync with Nokia Suite.
    I can't see a way of forwarding mail from a different account to the one it was recieved on (an I guess you would need this to forward as you say the account has been deleted) but if there is any text that you really need to save you can do this by forwarding/replying and then selecting text and copy/paste to a new document.
    N8-00 pc059C9F6 Belle
    808 PureView pc059P6W5
    Attachments:
    Scr000087.jpg ‏24 KB

  • Drop incoming mail from specific domain.

    Is this possible and if so how do I configure?
    I want to be able to drop incoming mail from, lets say, "@bigspammailer.com".  Is there a way to do this?  I have created an "Incoming Mail Policy" but don't know where to apply it.
    What I've tried that has not worked ....
    Incoming Content Filters, created a filter with Condition of "mail-from = = "@myemaildomain.com"$", and an action of "Drop".
    HAT Overview, creating a Sender Group using Mail Flow Policy "BLOCKED" setting SBRS to various settings including "None".
    I've grown exhausted reading through manuals. If you know of a document that directly addresses this issue (assuming it's possible) I'm not opposed to reading it.
    Any help will be greatly appreciated!
    Jim Mc.

    Sender Groups can be used to block messages based on the hostname or IP of the sending machine. It does not look at who the message is "from." To block mail based on the envelope sender you need to use a Filter or the Sender Verification Exception Table.
    Your example of a content filter seemed ok but after you create a filter you need to make sure that it is enabled for the incoming mail policy. Create your filter and then select Mail Policies -> Incoming Mail Policies. Under the column called Content Filters you will need to
    1) turn content filters on (default is off)
    2) enable the specific content filter that you just created
    You can also enter it in the Sender Verficiation Exception Table. You need to enable it under your ACCEPTED policy under Mail Policies -> Mail Flow Policies. There is a radio button all the way at the bottom for the exception table. Once you have it enabled then you can select Mail Policies -> Exception Table and add @domain.com to always reject.

  • Define Alert for mail from specific sender on E5-0...

    Hi All
    I'm supposed to receive pager on my E5-00 overnight so I wanted to define a alert (ringtone) when a mail from a specific user is received is that possible?
    Regards 

    You would have to set up a server-side filter which moves everything which isn't from this sender to another folder which you'd have to look at in the morning, enable it every night and disable it every morning.

  • Sync mail from Outlook to iPhone via USB Cable

    I have a problem by synchronizing my iPhone with my Outlook 2007.
    I want to synchronize my Outlook mail, contacts and calendar by using iTunes.
    I have set iTunes to synchronize via USB Cable and it works for the contacts and calendar but I can’t see my mail.
    I assume the mail should be at the bottom “Mail” on my iPhone?
    I have set iTunes to sync mail to Outlook but I can’t se anything
    How do I set op iTunes to sync my mail to the phone?
    Please help as I can only find answers for problems with Push server….
    Thanks in advance:)

    iTunes does not support syncing email account mailboxes and messages with an email client on your computer. The option under the Info tab for your iPhone sync preferences with iTunes for email accounts is for transferring the email account settings from a supported application on your computer to the iPhone's Mail client only so you don't have to manually create the account.
    If you want to keep mailboxes synchronized with the server automatically with each email client used to access the account, you need an IMAP account which is specifically designed for this.

Maybe you are looking for

  • How do I get a copy of Acrobat with my CS5 Master Collection???

    I activated my Adobe CS5 Master Collection (running on Snow Leopard) with a serial number purchased from CDW and everything went smoothly, but after a few days of using the core products I typically use I noticed Acrobat was not included in the insta

  • Safari crashing when i open Facebook - please help!!

    Hi guys, I am using a Macbook Pro with Mac OS version 10.5.8 and running Safari version 5.0.6. Since yesterday whenever I try to open Facebook (it's ONLY Facebook, all other websites seem to work fine) Safari crashes and I receive the following error

  • Can I install the LR4 upgrade and still keep my LR3 installed?

    I have LR 3 and I would like to upgrade to LR 4. Can I install the upgrade to LR 4 and still keep my LR 3 installation intact so that I can switch back and forth between the two versions if I want to?

  • Locked on Do not disconnect?

    I plugged in iPOD (video) to charge it and I get the screen on the iPOD that says Do not Disconnect, but it doesn't charge (no charging icon on the battery). It just stays locked. I opened iTunes and it doesn't recognize the iPOD. I actually disconne

  • Right Click Problems With Flash

    Sometimes when I click anywhere within a Flash object it will be like I'm right clicking. I'll have to refresh the page several times to make the error go away. According to software update, I do not require any updates. -Matt Message was edited by: