I am new to PowerShell so I am heavily relying on the Microsoft documentation while I am still new and learning. I am trying to gather up the size of our Users current mailbox and their archive mailbox in order to make changes to our Company retention policy. I know that I can get the archive mailbox size/percentage used from Exchange online, though I am wanting to get all of our users at one time instead of manually gather this information one user at a time.
I have been following the microsoft documents, though I am not getting the results that I want.
I have ran a few commands and they return results as they should, though I am not familiar with how to properly get the information I need out of Office365.
Any assistance with this would be greatly appreciated and save my head from banging against my desk!
The microsoft documents that I was following:
https://docs.microsoft.com/en-us/powershell/module/exchange/mailboxes/get-mailbox?view=exchange-ps
The commands from the microsoft documents that I have ran and got results, just not the information I need.
Get-MailboxFolderStatistics -Identity Company\FirstName.LastName
Get-MailboxStatistics -Identity Company\FirstName.LastName
Get-Mailbox -Archive -ResultSize unlimited | Export-CSV C:\Archives.csv
When I run the commands above, I do get results, but I am not getting the exact size of the user's mailbox or their archive mailbox.