Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Exchange Powershell Script Modification to add "Description"

Posted on 2011-03-09
7
Medium Priority
?
527 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
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 2000 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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

Are you an Exchange administrator employed with an organization? And, have you encountered a corrupt Exchange database due to which you are not able to open its EDB file. This article will explain all the steps to repair corrupt Exchange database.
With so many activities to perform, Exchange administrators are always busy in organizations. If everything, including Exchange Servers, Outlook clients, and Office 365 accounts work without any issues, they can sit and relax. But unfortunately, it…
In this video we show how to create an email address policy 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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Suggested Courses

604 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