How to get Mailbox usage using PowerShell in Exchange Online

Поделиться
HTML-код
  • Опубликовано: 21 авг 2024
  • Hi Everyone,
    In today's video, I will show how you can use PowerShell to Get UserMailbox or Sharedmailbox usage. They all show you the same result, with slight differences, and I used them a lot at work.
    First Command
    Get-Mailbox -Identity "MailboxName" | Get-MailboxStatistics | Select-Object DisplayName, ItemCount, TotalItemSize | Format-Table -autosize
    Second Command
    Get-Mailbox | Get-MailboxStatistics | Select-Object DisplayName, @{name=”TotalItemSize (GB)”;expression={[math]::Round((($_.TotalItemSize.Value.ToString()).Split(“(“)[1].Split(” “)[0].Replace(“,”,””)/1GB),2)}},ItemCount | Sort “TotalItemSize (GB)” -Descending

Комментарии • 21

  • @G4MBIT
    @G4MBIT Год назад +1

    Good stuff, mate

  • @av8dr
    @av8dr 2 года назад +1

    Thank you for this. Can you show how to increase an individual's mailbox size?

    • @TechTripChannel
      @TechTripChannel  2 года назад +1

      Hi, please watch my video ruclips.net/video/7gFzDRG6eTA/видео.html
      You can increase the mailbox size in the Registry. Let me know if you have any questions.

  • @DMBTravels2023
    @DMBTravels2023 2 года назад +1

    Hello TechTrip, thank you for this.
    can i ask ? what is the command when you are going to purge a certain mailbox? like in outlook app user unable to delete or receive emails. sometimes i cause due to usage are too large or within the mailbox capacity. thanks sir

    • @TechTripChannel
      @TechTripChannel  2 года назад

      Hi Jeem Barcail, there is a way to delete certain emails from a mailbox by a specific date range. I will create a how-to video in a few days. Is this what you are looking for?

    • @thehodophilechamp5242
      @thehodophilechamp5242 Год назад

      You can run commands for mange purge

  • @25_zubairkazi77
    @25_zubairkazi77 2 года назад

    How do I find a powershell command to check when user mailbox was converted in powershell??

  • @sunny19886
    @sunny19886 3 месяца назад

    What if you want to list down all the shared mailboxes you have so i can then find out who got access to what, how can i do this?

  • @shailendrapuri4075
    @shailendrapuri4075 2 года назад +1

    how can we get all unlicensed shared mailbox size?

    • @TechTripChannel
      @TechTripChannel  2 года назад +1

      I have a cmdlet for that; I will post a video soon.

    • @TechTripChannel
      @TechTripChannel  2 года назад +1

      Hi, this should work. Just copy and paste the command.
      #To check Shared mailbox size
      $SMbx = Get-Mailbox -RecipientTypeDetails SharedMailbox -ResultSize Unlimited
      $Report = @()
      ForEach ($S in $SMbx) {
      $Stat = (Get-MailboxStatistics -Identity $S.Alias | Select ItemCount, TotalItemSize)
      $ReportLine = [PSCustomObject][Ordered]@{
      Mailbox = $S.DisplayName
      TotalItems = $Stat.ItemCount
      MailboxSize = $Stat.TotalItemSize
      Quota = $S.ProhibitSendReceiveQuota
      Licensed = $S.SkuAssigned}
      $Report += $ReportLine }
      $Report | Format-Table Mailbox, TotalItems, MailboxSize, Quota, Licensed -AutoSize

  • @yogeshm8344
    @yogeshm8344 10 месяцев назад +1

    Hi.. can i export all outlook mail to pst format only use powershell

    • @TechTripChannel
      @TechTripChannel  10 месяцев назад

      Hi,
      Yes, you can; if you like, I can make a video.

    • @yogeshm8344
      @yogeshm8344 10 месяцев назад +1

      @@TechTripChannel bro but i need now for my project

    • @yogeshm8344
      @yogeshm8344 10 месяцев назад

      @@TechTripChannel i use some methods but manually export..last process but i need export to use only powershell please help me

    • @TechTripChannel
      @TechTripChannel  10 месяцев назад

      I can give you the commands:
      First, make sure you have the Import/Export role.
      You can do it from the O365 Admin Center.
      When you have assigned the role, create a folder and give Exchange Trusted Subsystem Read/Write access (right-click on the folder and select Share with)
      You need to use New-MailboxExportRequest and it only supports exporting to a UNC path.
      Run Powershell as an admin, the run this command:
      New-MailboxExportRequesr -Mailbox -FilePath "\\FilePath\fileName.pst\\
      This will export the mailbox
      If you need to check the status run this:
      Get-MailboxExportRequest
      I hope this helps.

    • @yogeshm8344
      @yogeshm8344 10 месяцев назад

      @@TechTripChannel thanks bro.
      But i want all user mail box in my organization