Solved

Exchange Powershell Script Modification

Posted on 2011-09-08
4
600 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 68

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 68

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Utilizing an array to gracefully append to a list of EmailAddresses
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

895 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now