Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 530
  • Last Modified:

Exchange Powershell Script Modification to add "Description"

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
vhaperbaugub
Asked:
vhaperbaugub
  • 3
  • 3
1 Solution
 
Glen KnightCommented:
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
 
vhaperbaugubAuthor Commented:
Thats what I thought also, but the Description column comes back blank, all the other columns have info in them.
0
 
Glen KnightCommented:
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
Neil RussellTechnical Development LeadCommented:
Description is a USER field not a mailbox field I believe u need to use a get-user call to get it.
0
 
vhaperbaugubAuthor Commented:
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
 
Glen KnightCommented:
If you run:

Get-Mailbox "user" | fl

this will list all the fields.  Title isn't one of them either.
0
 
vhaperbaugubAuthor Commented:
So there isn't a way to add Decription or Title to the output of this script?
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now