How to display number of items per .pst file

Status
Not open for further replies.

ofw62

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
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.

Thanks
 

Maxjackman001

Member
Outlook version
Outlook 2010 64 bit
Email Account
Exchange Server
Hi,

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

NAME
C:\Scripts\demo\Get-MailboxReport.ps1

SYNOPSIS
Get-MailboxReport.ps1 - Mailbox report generation script.

SYNTAX
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] []

DESCRIPTION
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.


REMARKS
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.

Cheers
Max
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange

ofw62

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
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...)

-
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
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.
 

ofw62

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Diane,
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)

-
 

ofw62

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Diane, please allow me to get back on this one.

I just discovered what I have been doing wrong...

When running the macro,one should select the mail account, so, e.g. blablaname-at-outlook.com (i.e. the top-level).
Outlook, like with me, may be configured to start in the Inbox and when executing the macro, with inbox selected, one will get an empty mail.
Sure ... it sound very logical indeed, but I was a bit puzzled...

SnagIt-10032018 112831.png
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Ah... yes, thanks for pointing that out. I'll update the article to make sure that is clear.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
A Prepending Email Addrs with "Display Name <email>" Has Stopped Working Using Outlook 0
M In Outlook Calendar remove the buttons: 'Today' and '<' (Back a day) and '>' (Forward a day) that are below the Ribbon and above the calendar display. Using Outlook 0
C Why won't Title display in message list? Using Outlook 1
R Auto display of new email does not work on non-default account Outlook VBA and Custom Forms 0
E How to display "Change Folder" in Change Default Email Delivery Location in Exchange Outlook 2016 Using Outlook 1
T Column to display which email alias a message was sent to Outlook VBA and Custom Forms 6
M Daily Task List Minimized Cannot Display Using Outlook 2
C Outlook Mobile app email order randomized and display names stripped Using Outlook 6
N Contact display as Using Outlook 2
J Reminders Display then Disappear Using Outlook 13
O How to display senders email address (column) Using Outlook 1
S Display PF contact folder items to select contact to link to appointment Outlook VBA and Custom Forms 1
I How to display sender's name instead of email address in outlook 2013 message Using Outlook 5
J Outlook 2016 message content does not display - outlook.com; exchange Using Outlook.com accounts in Outlook 9
O Display more months in 'Tasks' Using Outlook 3
soadfan Outlook rules look up display name only Using Outlook 4
C Display Sender As Contact Outlook VBA and Custom Forms 4
O How to display folder icons? Using Outlook 2
Treebys Array out of bounds .display 2016 Outlook VBA and Custom Forms 3
copperberry How to display incomplete tasks due on or before 7 days from now Using Outlook 0
T outlook 2010 mail item count doesnt match display Outlook VBA and Custom Forms 3
Diane Poremsky Category Color doesn't Display in Inbox New Slipstick.com Articles 0
P How to make outlook display alert appear on top of other windows whenever a new email is received? Outlook VBA and Custom Forms 1
T Outlook 2016 Calendar multiday event display Using Outlook 4
Diane Poremsky Display the Created Date field of any Outlook item New Slipstick.com Articles 0
Diane Poremsky Replace Display Names with Email Addresses New Slipstick.com Articles 0
Diane Poremsky Search for All Messages from Contact and Display in New Window New Slipstick.com Articles 0
K Display sub-folders in body of outlook Using Outlook 1
O How to display multi-line task in To-Do List - Outlook 2010 Using Outlook 1
Diane Poremsky Display the Recipient Email Address in the Sent Items Folder New Slipstick.com Articles 0
Diane Poremsky Excel Files Won't Display in Reading Pane New Slipstick.com Articles 1
D Display of Open Folders Using Outlook 0
Fozzie Bear Change the Display Name recipients see for Exchange account Exchange Server Administration 0
Diane Poremsky Pictures don't display in Outlook messages New Slipstick.com Articles 4
M Outlook VBA Macro that could retrieve/display the (From, Subject, Date Received) Outlook VBA and Custom Forms 2
William Yeack Outlook/Exchange - Changing display of “From” user Using Outlook 3
M Display as name in outlook contacts changes Using Outlook 5
R Coming from Thunderbird: "Always prefer display name over message header" Using Outlook 1
G Wrong display name in from column when removing pf replication Exchange Server Administration 1
J Changing margins in received email display Using Outlook 3
W All Events Disappear from Calendar Display Using Outlook 30
J How to display senders name in inbox Using Outlook 2
R 'Display as' email query Using Outlook 1
Maybear Sudden change in Outlook, no image display, email no longer offers suggestions for address Using Outlook 8
L Messages in old PST display as code Using Outlook 1
C images won't display in email Using Outlook 2
B Display of Sending Account in Outlook 2007 no longer works Using Outlook 2
P Outlook can not display picture inline. Using Outlook 7
O Outlook 2013 contacts - Where to find "Display as"-field Using Outlook 2
R New computer, OL2010 unable to display shared calendar appointments Exchange Server Administration 3

Similar threads

Top