1. Here's a thread that needs an answer: Missing Outlook subordinate folder
    Dismiss Notice

Outlook 2016 How to display number of items per .pst file

Discussion in 'Using Outlook' started by ofw62, Nov 11, 2017 at 7:13 AM.

  1. ofw62


    Senior Member
    Is there an easy way to display the total number of items (so, inbox, sent, drafts, etc.) per email account, i.e. per .pst file.

    I have multiple email accounts (different domains, Outlook, Gmail, 2 local providers, a number of archive .pst-files).

    Right now, I have to go thru all the separate folders and make note of the items.

  2. Maxjackman001



    [PS] C:\Scripts\demo>Get-Help .\Get-MailboxReport.ps1


    Get-MailboxReport.ps1 - Mailbox report generation script.

    C:\Scripts\demo\Get-MailboxReport.ps1 [-database ] []

    C:\Scripts\demo\Get-MailboxReport.ps1 [-file ] []

    C:\Scripts\demo\Get-MailboxReport.ps1 [-server ] []

    C:\Scripts\demo\Get-MailboxReport.ps1 [-mailbox ] []

    C:\Scripts\demo\Get-MailboxReport.ps1 [-all] []

    Generates a report of useful information for
    the specified server, database, mailbox or list of mailboxes.
    Use only one parameter at a time depending on the scope of
    your mailbox report.

    To see the examples, type: "get-help C:\Scripts\demo\Get-MailboxReport.ps1 -examples".
    For more information, type: "get-help C:\Scripts\demo\Get-MailboxReport.ps1 -detailed".
    For technical information, type: "get-help C:\Scripts\demo\Get-MailboxReport.ps1 -full".

    Depending on which parameter you use the output will vary.

    • If you use the -mailbox parameter to query a single mailbox, then the output will appear in the console window. I don't really see the need to output a single mailbox's details to a CSV file.
    • If you use any of the other parameters, -server, -database, -file, or -all, the output will be written to a CSV file in the same folder you're running the script from.
    • You can use the optional -filename parameter to specify your own output file name
    Once you've generated the CSV report you can open it with Excel and begin to analyze the data.

  3. Diane Poremsky

    Diane Poremsky

    Senior Member
  4. ofw62


    Senior Member
    Thank you both.
    @Maxjackman001 - regretfully nothing happens whilst running the Powershell script. Seems it isn't verified for Windows 10. Also I am running POP3 with PST files. Probably the script is meant for Exchange only.

    @Diane - many thanks. Regretfully, same as what Jamie Klein on the 'Print a list of your Outlook folders' is writing: opens an blank email. I am using Office 2016. That aside, as it starts with my main account, inbox, it looks... as if I need to select/point each account and run the macro then, i.e. the macro may not go thru all the accounts and all the folders and sub-folders.
    I am not sure about that though: it stops at creating a blank mail.

    Oh .. please note: I am not familiar with VBA
    (My knowledge ends at : Alt-F11, insert module, paste code and save/close...)

  5. Diane Poremsky

    Diane Poremsky

    Senior Member
    Yeah, the macro, as written, doesn't loop all of the stores. (But that can be fixed)

    Do you get any error messages? it's working here to create a message, but it's popped up the background.
  6. ofw62


    Senior Member
    I didn't get any errors, just a blank mail was created and there it stopped.
    So, start macro, select inbox + 'OK'.
    Result: blank mail.

    As said, I don't have knowledge of macro's/VBA.
    Nonetheless I checked the script (abacadabra for me) but noticed 'MAPIFolder' showing up a few times.

    I am using POP3 and the .pst files are located on a different partition, i.e. not in some default C:\Something folder.
    MAPI vs POP - could that have something to do with it?
    (merely a wild guess on my part)


Share This Page