Share via


Powershell: Find Mail Box Size Office 365 Powershell Export to csv

View

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

http://www.yshvili.com/images/cloude.JPG

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”

http://www.yshvili.com/images/cloude4.JPG

Mail Box Size Including the Item

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

http://www.yshvili.com/images/cloud2.JPG

**Get the mailbox size using **

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

http://www.yshvili.com/images/cloude3.JPG