Solved

Exchange Powershell Script Modification to add "Description"

Posted on 2011-03-09
7
523 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
ID: 35088159
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
ID: 35088377
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
ID: 35088415
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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 37

Expert Comment

by:Neil Russell
ID: 35088441
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
ID: 35088567
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
ID: 35088581
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
ID: 35089181
So there isn't a way to add Decription or Title to the output of this script?
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

730 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