Hello,
I am using a script below to get the Deleted items information. What I want to be able to do is instead of using Identity from the Get-MailboxFolderStatistics I would like to use the DisplayName from get-mailbox
get-mailbox | Get-MailboxFolderStatistics -FolderScope 'DeletedItems' | Select Identity, FolderPath, ItemsInFolder, FolderSize.
thanks
jackyjoy
Get-mailbox and Get-MailboxFolderStatistics ?..
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
-
- Posts: 2
- Joined: Wed Dec 16, 2020 2:40 am
-
- Posts: 14672
- Joined: Tue May 22, 2007 9:57 am
- Has voted: 1 time
- Been upvoted: 5 times
- Contact:
Re: Get-mailbox and Get-MailboxFolderStatistics ?..
This is how to persist an object in the pipeline:
Code: Select all
Get-Mailbox -PipelineVariable mb |
Get-MailboxFolderStatistics -FolderScope DeletedItems |
Select-Object @{n='DisplayName';e={$mb.DisplayName}}, FolderPath, ItemsInFolder, FolderSize