Christian Hans
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,LitigationHoldEna bled,IsMai lboxEnable d,ResetPas swordOnNex tLogon,Sam AccountNam e,ServerNa me,Office, UserPrinci palName,Wh enMailboxC reated,Ali as,Display Name,Hidde nFromAddre ssListsEna bled,Prima rySmtpAddr ess,Recipi entTypeDet ails,Organ izationalU nit
Get-MailboxStatistics | Select DisplayName,LastLogonTime, ServerName ,DatabaseN ame
| Export-CSV c:\report.csv -notrypeinformation
Thanks in advance
Get-Mailbox -ResultSize Unlimited | select Database,LitigationHoldEna
Get-MailboxStatistics | Select DisplayName,LastLogonTime,
| Export-CSV c:\report.csv -notrypeinformation
Thanks in advance
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Pistols at dawn Chris :)