Solved

Exchange Powershell Script Modification to add "Description"

Posted on 2011-03-09
7
521 Views
Last Modified: 2012-05-11
Hello - I need the script below modified to show the "Description" of the user in the output file.


Get-MailboxServer | Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Where {$_.TotalItemSize -gt 500MB} |  Select `
  DisplayName, Title, 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
  • 3
  • 3
7 Comments
 
LVL 74

Expert Comment

by:Glen Knight
Comment Utility
Well if it works as is then simply add the description in to the select section like:

Get-MailboxServer | Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Where {$_.TotalItemSize -gt 500MB} |  Select `
  DisplayName, Title, description, 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
 

Author Comment

by:vhaperbaugub
Comment Utility
Thats what I thought also, but the Description column comes back blank, all the other columns have info in them.
0
 
LVL 74

Expert Comment

by:Glen Knight
Comment Utility
Where are you seeing the desciption field?

I have just done a Get-Mailbox | fl and there is no description field which is why it's not returning anything.
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 37

Expert Comment

by:Neil Russell
Comment Utility
Description is a USER field not a mailbox field I believe u need to use a get-user call to get it.
0
 

Author Comment

by:vhaperbaugub
Comment Utility
Can we use the Title field instead of the Decription field or will that not work either? I believe it come back blank also.
0
 
LVL 74

Accepted Solution

by:
Glen Knight earned 500 total points
Comment Utility
If you run:

Get-Mailbox "user" | fl

this will list all the fields.  Title isn't one of them either.
0
 

Author Comment

by:vhaperbaugub
Comment Utility
So there isn't a way to add Decription or Title to the output of this script?
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this video we show how to create an Accepted Domain in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Ac…
how to add IIS SMTP to handle application/Scanner relays into office 365.

728 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

10 Experts available now in Live!

Get 1:1 Help Now