Solved

Exchange Powershell Script Modification

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
A procedure for exporting installed hotfix details of remote computers using powershell
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

744 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

11 Experts available now in Live!

Get 1:1 Help Now