Answered by:
Combining get-mailbox with get-mailboxstatistics output

Question
-
Trying to extract mailboxes that are not using the database defaults and include their name, database and quota information. That is fine I can get all of that from get-mailbox -
"Get-Mailbox -ResultSize unlimited | where {$_.UseDatabasequotadefaults -ne "true"} | select displayname, database,issuewarningquota,prohibitsendquota"
And pipe to a file.
What I would like to include is the totalitemsize (size of mailbox) include with this which is only available from Get-MailboxStatistics. How can I include this in my above code ?
Thanks in advance!
Wednesday, March 20, 2013 3:09 PM
Answers
-
You'll have to script it because you're going to have to combine data from two different cmdlets (Get-Mailbox and Get-MailboxStatistics) into the output. You'll have to write a loop based on the results of Get-Mailbox, save the properties from each cmdlet you want, then write them to the CSV.
Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
Wednesday, March 20, 2013 5:31 PM
All replies
-
You'll have to script it because you're going to have to combine data from two different cmdlets (Get-Mailbox and Get-MailboxStatistics) into the output. You'll have to write a loop based on the results of Get-Mailbox, save the properties from each cmdlet you want, then write them to the CSV.
Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
Wednesday, March 20, 2013 5:31 PM -
Thanks Ed - I was thinking I could pipe the two cmdlets together - which I have done in the past. Hmmm ... got any hints or templates I could run with and modify to include the above desired results ?Wednesday, March 20, 2013 9:54 PM
-