Solved

Exchange Powershell Script Modification to add "Description"

Posted on 2011-03-09
7
522 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

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
Read this checklist to learn more about the 15 things you should never include in an email signature.
In this video we show how to create a Distribution Group 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 Recipients >>…
In this video we show how to create a Contact 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 Recipients >> Contact ta…

815 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

13 Experts available now in Live!

Get 1:1 Help Now