Powershell query to count search term for mailbox RRS feed

  • Question

  • I am using a powershell script to extract emails for a discovery (Exchange 2007 SP2):

    export-mailbox -id [user] -allcontentkeywords "search term"  -pstfolderpath c:\temp -ExcludeFolders "\Junk E-Mail","\Contacts","\Deleted Items" -TargetMailbox

    Can anyone point me how to use powershell to count how many items will be exported prior to actually running this script?


    Tuesday, April 24, 2012 5:15 PM


  • Hi LarryS56,

    Per my know, there is no direct way or cmdlets could retrieve the amounts for the item before actually running the "export-mailbox" in exchange 2007.
    Maybe could counts them after the action.
    Like mike referred, use the indrect way.


    TechNet Subscriber Support in forum if you have any feedback on our support, please contact tngfb@microsoft.com
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.


    TechNet Community Support

    Wednesday, April 25, 2012 9:42 AM

All replies