mailbox report

is there a way for both on-prem exchange of office 365 to run a simple command to show all mailboxes that currently reside on your servers/office365 environment, including the size of the mailbox?
Who is Participating?
Jose Gabriel Ortega CCEO Faru Bonon ITCommented:
Nope you will need to combine both (on-prem commands with the connection and o365 connectors)

$Onprem+=get-mailboxdatabase | Get-MailboxStatistics | select DisplayName,TotalItemsize,itemcount

$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session

$Onprem+=get-mailboxdatabase | Get-MailboxStatistics | select DisplayName,TotalItemsize,itemcount

Remove-PSSession $Session

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.