Solved

Exchange Powershell Script Modification

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

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Microsoft Windows Server Update Service (WSUS) is free for everyone, but it lacks of some desirable features like send an e-mail to the administrator with the status of all computers on the WSUS server. This article is based on my PowerShell script …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
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…

830 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