Connect to Exchange Online PowerShell
Exchange Online PowerShell Modunle
You need install Exchange Online module only once. In the next time, run to connect to Exchange Online PowerShell.
##Connect to Exchange Online Powershell.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine -Force;
Install-PackageProvider -Name NuGet -Force;
Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted;
Install-Module -Name ExchangeOnlineManagement;
Import-Module ExchangeOnlineManagement;
Connect-ExchangeOnline;
Get-ExOMailbox -Identity adelev@leoguides.info |
Get-MailboxFolderStatistics |
Select FolderPath,ItemsInFolder | Sort-Object -Property ItemsInFolder -Descending
Export to CSV
New-Item -Path "C:\" -Name "Temp" -ItemType "directory" -Force
Get-ExOMailbox -Identity adelev@leoguides.info |
Get-MailboxFolderStatistics |
Select FolderPath,ItemsInFolder |
Export-Csv C:\Temp\Result.csv -NoType | Start C:\Temp\
5/5 - (1 vote)