Identifying Large Calendar Items for Multiple Users

Another interesting and fun scenario. In my last post, I discussed using PowerShell to find large calendar items. Well, it didn’t go as well as I thought.

I was trying to identify the largest calendar item for users. The idea was to find these large calendar items so that junior admins can work with the users to see if the calendar items are large because they have been updated too often. Originally, I was trying to identify all users that have items over 50MB in size. Well, after seeing the output, I couldn’t understand why it wasn’t working as expected. Here is what I ran:

Get-Mailbox –ResultSize Unlimited | Get-MailboxFolderStatistics -FolderScope Calendar -IncludeAnalysis | where {$_.TopSubjectSize -gt 50000000} | Select TopSubjectFrom,Identity,TopSubject,TopSubjectSize

Well, let’s just say that I got all sorts of odd results. What I wanted was the largest Calendar item from each mailbox if it was 50 MB or larger.

To set the scene. I will used two mailboxes, mine and Jack B. Nimble’s (his name has been changed to protect his innocence). My TopSubjectSize for a calendar object is approx 2.7 MB. Jack’s is approx 880KB. So I start off just to show what the largest item is for each of us with these two commands and the results of the command:

Get-MailboxFolderStatistics russell.kaufmann -FolderScope Calendar -IncludeAnalysis | Select TopSubjectFrom,Identity,TopSubject,TopSubjectSize

TopSubjectFrom      Identity            TopSubject          TopSubjectSize

Poppins, Mary       russell.kaufmann    Dancing in the S… 2.707 MB (2,838,…

Get-MailboxFolderStatistics jack.b.nimble -FolderScope Calendar -IncludeAnalysis | Select TopSubjectFrom,Identity,TopSubject,TopSubjectSize

TopSubjectFrom      Identity            TopSubject          TopSubjectSize

Goose, Mother       Jack.B.Nimble       Partying All Nig… 884.5 KB (905,68…

So, if I use the Where filter and try to filter out for anything over 800KB,  I get the following:

Get-MailboxFolderStatistics russell.kaufmann -FolderScope Calendar -IncludeAnalysis | where {$_.TopSubjectSize -gt 800000} | Select TopSubjectFrom,Identity,TopSubject,TopSubjectSize

Get-MailboxFolderStatistics jack.b.nimble -FolderScope Calendar -IncludeAnalysis | where {$_.TopSubjectSize -gt 800000} | Select TopSubjectFrom,Identity,TopSubject,TopSubjectSize

TopSubjectFrom      Identity            TopSubject          TopSubjectSize

Goose, Mother       Jack.B.Nimble       Partying All Nig… 884.5 KB (905,68…

Notice, for mine, it didn’t properly identify the item, but it did for Jack’s. Isn’t 2.707 MB greater than 800KB? Shouldn’t I have seen my top subject size?

Now for some fun. If I filter based on –gt 2, here is what I get:

Get-MailboxFolderStatistics russell.kaufmann -FolderScope Calendar -IncludeAnalysis | where {$_.TopSubjectSize -gt 2} | Select TopSubjectFrom,Identity,TopSubject,TopSubjectSize

TopSubjectFrom      Identity            TopSubject          TopSubjectSize

Poppins, Mary       russell.kaufmann    Dancing in the S… 2.707 MB (2,838,…

Get-MailboxFolderStatistics jack.b.nimble -FolderScope Calendar -IncludeAnalysis | where {$_.TopSubjectSize -gt 2} | Select TopSubjectFrom,Identity,TopSubject,TopSubjectSize

TopSubjectFrom      Identity            TopSubject          TopSubjectSize

Goose, Mother       Jack.B.Nimble       Partying All Nig… 884.5 KB (905,68…

So, 2.707MB is greater than 2, and 884.5KB is greater than 2. They both worked.

What about if I use 3 instead? Great question, so here is what I get:

Get-MailboxFolderStatistics russell.kaufmann -FolderScope Calendar -IncludeAnalysis | where {$_.TopSubjectSize -gt 3} | Select TopSubjectFrom,Identity,TopSubject,TopSubjectSize

Get-MailboxFolderStatistics jack.b.nimble -FolderScope Calendar -IncludeAnalysis | where {$_.TopSubjectSize -gt 3} | Select TopSubjectFrom,Identity,TopSubject,TopSubjectSize

TopSubjectFrom      Identity            TopSubject          TopSubjectSize

Goose, Mother       Jack.B.Nimble       Partying All Nig… 884.5 KB (905,68…

2.707MB is not greater than 3, so I don’t get a result for mine, but Jack’s 884.5 KB is greater than 3.

Come on, you have to admit that this is funny stuff.

Advertisements
This entry was posted in Exchange. Bookmark the permalink.

4 Responses to Identifying Large Calendar Items for Multiple Users

  1. chalkboards says:

    Hi there, I do believe your blog might be having browser compatibility issues.
    When I look at your site in Safari, it looks fine but when opening in I.

    E., it’s got some overlapping issues. I just wanted to give you a quick heads up! Other than that, wonderful blog!

  2. This unique posting, “Identifying Large
    Calendar Items for Multiple Users | Build Your Business on
    a Solid Infrastructure” was in fact outstanding. I’m printing out a replica to demonstrate to my
    pals. Thanks-Phillip

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s