Solved

Exchange Powershell Script Modification

Posted on 2011-09-08
4
601 Views
Last Modified: 2012-05-12
I need to have this script edited so it will also show when the user last logged into the their Outlook mailbox please.

Get-MailboxServer | Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Where {$_.TotalItemSize -gt 500MB} |  Select `  DisplayName, LegacyDN, ItemCount,   @{label="CalendarItemSize (MB)";expression={(Get-MailboxFolderStatistics -Identity $_.Identity -FolderScope Calendar).FolderAndSubfolderSize.ToMB()}},  @{label="Total Deleted Size (MB)";expression={$_.TotalDeletedItemSize.Value.ToMB()}},    @{label="Total Size (MB)";expression={$_.TotalItemSize.Value.ToMB()}},    StorageLimitStatus,  Database | Export-Csv All_users_mailbox_size.csv -notypeinformation

0
Comment
Question by:vhaperbaugub
  • 2
  • 2
4 Comments
 
LVL 69

Expert Comment

by:Qlemo
ID: 36506678
You just need to append the column to Select-Object:
Get-MailboxServer | Get-Mailbox -ResultSize Unlimited | 
Get-MailboxStatistics | Where {$_.TotalItemSize -gt 500MB} | 
Select DisplayName, LegacyDN, ItemCount,  `
   @{label="CalendarItemSize (MB)";expression={(Get-MailboxFolderStatistics -Identity $_.Identity -FolderScope Calendar).FolderAndSubfolderSize.ToMB()}},  `
   @{label="Total Deleted Size (MB)";expression={$_.TotalDeletedItemSize.Value.ToMB()}},  `
   @{label="Total Size (MB)";expression={$_.TotalItemSize.Value.ToMB()}},  `
   StorageLimitStatus,  Database, LastLogonTime | 
Export-Csv All_users_mailbox_size.csv -notypeinformation

Open in new window

0
 

Author Comment

by:vhaperbaugub
ID: 36507432
Does this LastLoginTime show the last time the user logged into their PC or the last time they opened Outlook and read their mail?
0
 
LVL 69

Accepted Solution

by:
Qlemo earned 500 total points
ID: 36508453
The last time they connected to the Exchange mailbox.
0
 

Author Comment

by:vhaperbaugub
ID: 36509990
OK....Thanks for your help.
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

"Migrate" an SMTP relay receive connector to a new server using info from an old server.
The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question