Avatar of Christian Hans
Christian Hans
Flag for United States of America

asked on 

Combining Get-Mailbox and Get-MailboxStatistics in PowerShell

I am wanting to run a one liner in PowerShell by combining these two commands... how can I have them both run and export to a CSV output?

Get-Mailbox -ResultSize Unlimited | select Database,LitigationHoldEnabled,IsMailboxEnabled,ResetPasswordOnNextLogon,SamAccountName,ServerName,Office,UserPrincipalName,WhenMailboxCreated,Alias,DisplayName,HiddenFromAddressListsEnabled,PrimarySmtpAddress,RecipientTypeDetails,OrganizationalUnit

Get-MailboxStatistics | Select DisplayName,LastLogonTime,ServerName,DatabaseName

| Export-CSV c:\report.csv -notrypeinformation

Thanks in advance
Powershell* ExportExchange

Avatar of undefined
Last Comment
Jason Crawford

8/22/2022 - Mon