Expoert Mail Box Size Office 365 Powershell

Run the following WindowsPowerShell RUN AS ADMINISTRATOR

$LiveCred = Get-Credential

Windows PowerShell Credential Request window that opens type the credentials of an account in your cloud-based organization When you are finished click OK

Run this Session Connection Uri https://ps.outlook.com/powershell/ Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection

enables cloud-based organizations in datacenters all over the world to connect Windows PowerShell to the cloud-based server

Import the session

Import-PSSession $Session

SMTP Address Export

Get-Mailbox -ResultSize Unlimited | Select-Object DisplayName,PrimarySmtpAddress | Export-CSV “c:\SmtpAddress.csv”

the info in a csv file

Get-mailbox | Get-Mailboxstatistics | select displayname,TotalItemSize | export-csv “c:\yanivmailbox.csv”

Mail Box Size Including the Item

Get-Mailbox | Get-MailboxStatistics | ft DisplayName,TotalItemSize,ItemCount

Get the mailbox size using 

Get-mailbox | Get-Mailboxstatistics | select displayname,TotalItemSize

2 Comments:

Leave a Reply

Your email address will not be published. Required fields are marked *


CAPTCHA Image
Reload Image

This site uses Akismet to reduce spam. Learn how your comment data is processed.

WhatsApp Logo IT World