[{"data":1,"prerenderedAt":2030},["ShallowReactive",2],{"post:\u002F2025\u002F09\u002F03\u002Fpowershell-exchange-online-report-mailboxes-approaching-their-quota\u002F":3},{"post":4,"newer":1981,"older":1991,"related":2001,"series":2028},{"id":5,"title":6,"body":7,"canonical":1962,"categories":1963,"date":1966,"description":1967,"extension":1968,"featured":1969,"hero":1970,"image":1970,"meta":1971,"navigation":553,"path":1972,"readingTime":338,"seo":1973,"series":1970,"seriesOrder":1970,"sites":1974,"source":1970,"stem":1975,"tags":1976,"updated":1970,"url":1979,"__hash__":1980},"blog\u002Fblog\u002F2025\u002F09\u002F03\u002Fpowershell-exchange-online-report-mailboxes-approaching-their-quota.md","PowerShell: Exchange Online – Report Mailboxes Approaching Their Quota",{"type":8,"value":9,"toc":1954},"minimark",[10,19,24,48,52,139,143,146,181,184,219,226,290,293,301,305,1723,1727,1895,1899,1950],[11,12,13,14,18],"p",{},"Nobody notices a mailbox creeping up on its quota until it stops sending mail and a help desk ticket lands with \"I can't send email\" and no other context. Exchange Online does warn the user, but on the big plans the warning comes late: for Microsoft 365 E3\u002FE5 and Business plans the defaults are a warning at 98 GB, prohibit send at 99 GB and prohibit send\u002Freceive at 100 GB, so the user gets one email with 1 GB of headroom. This script reports every mailbox above a percentage of its ",[15,16,17],"code",{},"ProhibitSendQuota"," well before that, so you can nudge people, enable an archive, or fix a retention policy ahead of the bounce. It also reports the Recoverable Items folder, which has its own quota (30 GB, or 100 GB on hold) and fills up silently on mailboxes under litigation hold.",[20,21,23],"h2",{"id":22},"requirements","Requirements",[25,26,27,31,38,45],"ul",{},[28,29,30],"li",{},"PowerShell 7, or Windows PowerShell 5.1.",[28,32,33,34,37],{},"The ExchangeOnlineManagement module, version 3.0.0 or later (the REST-based EXO V3 module): ",[15,35,36],{},"Install-Module -Name ExchangeOnlineManagement",".",[28,39,40,41,44],{},"A connected session: ",[15,42,43],{},"Connect-ExchangeOnline"," interactively, or app-only certificate authentication for a scheduled task.",[28,46,47],{},"A role that can read mailboxes and mailbox statistics tenant-wide, for example Global Reader or Exchange Administrator.",[20,49,51],{"id":50},"parameters","Parameters",[53,54,55,74],"table",{},[56,57,58],"thead",{},[59,60,61,65,68,71],"tr",{},[62,63,64],"th",{},"Name",[62,66,67],{},"Type",[62,69,70],{},"Required",[62,72,73],{},"Description",[75,76,77,100,125],"tbody",{},[59,78,79,85,88,91],{},[80,81,82],"td",{},[15,83,84],{},"WarningPercent",[80,86,87],{},"Int",[80,89,90],{},"No",[80,92,93,94,96,97,37],{},"Percentage of ",[15,95,17],{}," used that puts a mailbox in the report. Defaults to ",[15,98,99],{},"80",[59,101,102,107,113,115],{},[80,103,104],{},[15,105,106],{},"RecipientTypeDetails",[80,108,109,110],{},"String",[111,112],"span",{},[80,114,90],{},[80,116,117,118,121,122,37],{},"Mailbox types to check. Defaults to ",[15,119,120],{},"UserMailbox"," and ",[15,123,124],{},"SharedMailbox",[59,126,127,132,134,136],{},[80,128,129],{},[15,130,131],{},"OutputPath",[80,133,109],{},[80,135,90],{},[80,137,138],{},"CSV path to export the report to. If omitted, the report only prints to the console.",[20,140,142],{"id":141},"usage","Usage",[11,144,145],{},"Connect, then run with the default 80 percent threshold:",[147,148,153],"pre",{"className":149,"code":150,"language":151,"meta":152,"style":152},"language-powershell shiki shiki-themes github-dark","Connect-ExchangeOnline -ShowBanner:$false\n.\\Get-MailboxQuotaReport.ps1\n","powershell","",[15,154,155,173],{"__ignoreMap":152},[111,156,159,162,166,170],{"class":157,"line":158},"line",1,[111,160,43],{"class":161},"sDLfK",[111,163,165],{"class":164},"snl16"," -",[111,167,169],{"class":168},"s95oV","ShowBanner:",[111,171,172],{"class":161},"$false\n",[111,174,176,178],{"class":157,"line":175},2,[111,177,37],{"class":168},[111,179,180],{"class":161},"\\Get-MailboxQuotaReport.ps1\n",[11,182,183],{},"Report anything over 90 percent, user mailboxes only, and save it for a scheduled task to email:",[147,185,187],{"className":149,"code":186,"language":151,"meta":152,"style":152},".\\Get-MailboxQuotaReport.ps1 -WarningPercent 90 -RecipientTypeDetails UserMailbox -OutputPath 'C:\\Reports\\mailbox-quota.csv'\n",[15,188,189],{"__ignoreMap":152},[111,190,191,193,196,198,201,204,206,209,212,215],{"class":157,"line":158},[111,192,37],{"class":168},[111,194,195],{"class":161},"\\Get-MailboxQuotaReport.ps1",[111,197,165],{"class":164},[111,199,200],{"class":168},"WarningPercent ",[111,202,203],{"class":161},"90",[111,205,165],{"class":164},[111,207,208],{"class":168},"RecipientTypeDetails UserMailbox ",[111,210,211],{"class":164},"-",[111,213,214],{"class":168},"OutputPath ",[111,216,218],{"class":217},"sU2Wk","'C:\\Reports\\mailbox-quota.csv'\n",[11,220,221,222,225],{},"Unattended, with an app registration and a certificate in the machine store (see Microsoft's app-only authentication article for the one-time setup of the app, the ",[15,223,224],{},"Exchange.ManageAsApp"," permission and a directory role):",[147,227,229],{"className":149,"code":228,"language":151,"meta":152,"style":152},"Connect-ExchangeOnline -CertificateThumbprint '\u003Cthumbprint>' -AppId '\u003Capplication-id>' -Organization '\u003Ctenant>.onmicrosoft.com' -ShowBanner:$false\n.\\Get-MailboxQuotaReport.ps1 -OutputPath 'C:\\Reports\\mailbox-quota.csv'\nDisconnect-ExchangeOnline -Confirm:$false\n",[15,230,231,265,277],{"__ignoreMap":152},[111,232,233,235,237,240,243,245,248,251,253,256,259,261,263],{"class":157,"line":158},[111,234,43],{"class":161},[111,236,165],{"class":164},[111,238,239],{"class":168},"CertificateThumbprint ",[111,241,242],{"class":217},"'\u003Cthumbprint>'",[111,244,165],{"class":164},[111,246,247],{"class":168},"AppId ",[111,249,250],{"class":217},"'\u003Capplication-id>'",[111,252,165],{"class":164},[111,254,255],{"class":168},"Organization ",[111,257,258],{"class":217},"'\u003Ctenant>.onmicrosoft.com'",[111,260,165],{"class":164},[111,262,169],{"class":168},[111,264,172],{"class":161},[111,266,267,269,271,273,275],{"class":157,"line":175},[111,268,37],{"class":168},[111,270,195],{"class":161},[111,272,165],{"class":164},[111,274,214],{"class":168},[111,276,218],{"class":217},[111,278,280,283,285,288],{"class":157,"line":279},3,[111,281,282],{"class":161},"Disconnect-ExchangeOnline",[111,284,165],{"class":164},[111,286,287],{"class":168},"Confirm:",[111,289,172],{"class":161},[11,291,292],{},"Sample console output, most urgent first:",[147,294,299],{"className":295,"code":297,"language":298,"meta":152},[296],"language-text","Checked 1,184 mailbox(es); 4 at or above 80% of ProhibitSendQuota.\n\nDisplayName        Type          UsedGB QuotaGB PercentUsed RecoverableGB RecoverablePercent ArchiveEnabled\n-----------        ----          ------ ------- ----------- ------------- ------------------ --------------\n\u003Cdisplay-name>     UserMailbox     48.9    49.5        98.8           2.1                7.0 False\n\u003Cdisplay-name>     UserMailbox     91.3    99.0        92.2          88.6               88.6 True\n\u003Cdisplay-name>     UserMailbox     84.0    99.0        84.8          11.4               38.0 False\n\u003Cdisplay-name>     UserMailbox     79.6    99.0        80.4           0.9                3.0 True\n","text",[15,300,297],{"__ignoreMap":152},[20,302,304],{"id":303},"script","Script",[147,306,308],{"className":149,"code":307,"language":151,"meta":152,"style":152},"\u003C#\n.SYNOPSIS\n    Reports Exchange Online mailboxes approaching their send quota.\n.DESCRIPTION\n    Enumerates mailboxes with Get-EXOMailbox (Quota and Archive property sets), reads each mailbox's\n    TotalItemSize and TotalDeletedItemSize with Get-EXOMailboxStatistics, and returns the mailboxes\n    at or above a percentage of ProhibitSendQuota, with Recoverable Items usage against\n    RecoverableItemsQuota alongside. Sorted with the most urgent mailboxes first. Optionally exports\n    the report to CSV.\n.PARAMETER WarningPercent\n    Percentage of ProhibitSendQuota used that puts a mailbox in the report. Defaults to 80.\n.PARAMETER RecipientTypeDetails\n    Mailbox types to check. Defaults to UserMailbox and SharedMailbox.\n.PARAMETER OutputPath\n    CSV path to export the report to. If omitted, the report only prints to the console.\n.EXAMPLE\n    .\\Get-MailboxQuotaReport.ps1 -WarningPercent 90 -OutputPath 'C:\\Reports\\mailbox-quota.csv'\n.NOTES\n    Author  : Thomas Lasswell (https:\u002F\u002Fwww.techcolumnist.com)\n    Version : 1.0 (2025-09-03)\n    Requires: ExchangeOnlineManagement 3.0.0 or later, an active Connect-ExchangeOnline session\n#>\n[CmdletBinding()]\nparam (\n    [Parameter(Mandatory = $false)]\n    [ValidateRange(1, 100)]\n    [int]$WarningPercent = 80,\n\n    [Parameter(Mandatory = $false)]\n    [string[]]$RecipientTypeDetails = @('UserMailbox', 'SharedMailbox'),\n\n    [Parameter(Mandatory = $false)]\n    [string]$OutputPath\n)\n\nfunction ConvertTo-ByteCount {\n    param ($Size)\n\n    # Quotas and sizes arrive either as a ByteQuantifiedSize (with ToBytes()) or as its\n    # string form, for example \"4.92 GB (5,283,165,983 bytes)\". \"Unlimited\" returns $null.\n    if ($null -eq $Size) {\n        return $null\n    }\n    if ($Size.PSObject.Properties['Value'] -and $Size.Value -and $Size.Value.PSObject.Methods['ToBytes']) {\n        return [double]$Size.Value.ToBytes()\n    }\n    $text = $Size.ToString()\n    if ($text -match '\\(([\\d,.\\s]+) bytes\\)') {\n        return [double]($Matches[1] -replace '[^\\d]', '')\n    }\n    return $null\n}\n\nif (-not (Get-ConnectionInformation)) {\n    throw 'No Exchange Online session. Run Connect-ExchangeOnline first.'\n}\n\nWrite-Verbose 'Retrieving mailboxes'\n$mailboxes = Get-EXOMailbox -ResultSize Unlimited -RecipientTypeDetails $RecipientTypeDetails -PropertySets Quota, Archive\n\n$checked = 0\n$report = foreach ($mailbox in $mailboxes) {\n    $quotaBytes = ConvertTo-ByteCount -Size $mailbox.ProhibitSendQuota\n    if (-not $quotaBytes) {\n        # Unlimited quota: nothing to measure against.\n        continue\n    }\n\n    # Never pass an empty identity: a $null Identity returns statistics for every mailbox.\n    if ([string]::IsNullOrWhiteSpace($mailbox.UserPrincipalName)) {\n        continue\n    }\n\n    try {\n        $stats = Get-EXOMailboxStatistics -UserPrincipalName $mailbox.UserPrincipalName -ErrorAction Stop\n    } catch {\n        Write-Warning \"Could not read statistics for $($mailbox.UserPrincipalName): $($_.Exception.Message)\"\n        continue\n    }\n    $checked++\n\n    $usedBytes = ConvertTo-ByteCount -Size $stats.TotalItemSize\n    if ($null -eq $usedBytes) {\n        continue\n    }\n\n    $percentUsed = [math]::Round(($usedBytes \u002F $quotaBytes) * 100, 1)\n    if ($percentUsed -lt $WarningPercent) {\n        continue\n    }\n\n    $deletedBytes = ConvertTo-ByteCount -Size $stats.TotalDeletedItemSize\n    $recoverableQuotaBytes = ConvertTo-ByteCount -Size $mailbox.RecoverableItemsQuota\n    $recoverablePercent = $null\n    if ($deletedBytes -and $recoverableQuotaBytes) {\n        $recoverablePercent = [math]::Round(($deletedBytes \u002F $recoverableQuotaBytes) * 100, 1)\n    }\n\n    [PSCustomObject]@{\n        DisplayName        = $mailbox.DisplayName\n        Mailbox            = $mailbox.PrimarySmtpAddress\n        Type               = $mailbox.RecipientTypeDetails\n        UsedGB             = [math]::Round($usedBytes \u002F 1GB, 1)\n        QuotaGB            = [math]::Round($quotaBytes \u002F 1GB, 1)\n        PercentUsed        = $percentUsed\n        RecoverableGB      = if ($deletedBytes) { [math]::Round($deletedBytes \u002F 1GB, 1) } else { 0 }\n        RecoverablePercent = $recoverablePercent\n        ArchiveEnabled     = $mailbox.ArchiveStatus -eq 'Active'\n    }\n}\n\n$sortedReport = @($report | Sort-Object -Property PercentUsed -Descending)\n\nWrite-Host (\"Checked {0:N0} mailbox(es); {1} at or above {2}% of ProhibitSendQuota.\" -f $checked, $sortedReport.Count, $WarningPercent)\n$sortedReport | Format-Table -Property DisplayName, Type, UsedGB, QuotaGB, PercentUsed, RecoverableGB, RecoverablePercent, ArchiveEnabled -AutoSize\n\nif ($OutputPath) {\n    $sortedReport | Export-Csv -Path $OutputPath -NoTypeInformation -Encoding UTF8\n    Write-Host \"Report exported to $OutputPath\"\n}\n",[15,309,310,316,323,328,336,342,348,354,360,366,377,383,393,399,409,415,423,429,437,443,449,455,461,473,482,507,528,548,555,572,603,608,625,635,641,646,659,668,673,679,685,703,712,718,749,763,768,779,796,830,835,843,849,854,873,882,887,892,901,932,937,948,968,983,995,1001,1007,1012,1017,1023,1036,1041,1046,1051,1059,1080,1091,1128,1133,1138,1147,1152,1167,1181,1186,1191,1196,1230,1244,1249,1254,1259,1274,1289,1299,1312,1342,1347,1352,1369,1380,1391,1402,1428,1453,1464,1506,1517,1534,1539,1544,1549,1578,1583,1610,1665,1670,1678,1704,1718],{"__ignoreMap":152},[111,311,312],{"class":157,"line":158},[111,313,315],{"class":314},"sAwPA","\u003C#\n",[111,317,318,320],{"class":157,"line":175},[111,319,37],{"class":161},[111,321,322],{"class":164},"SYNOPSIS\n",[111,324,325],{"class":157,"line":279},[111,326,327],{"class":314},"    Reports Exchange Online mailboxes approaching their send quota.\n",[111,329,331,333],{"class":157,"line":330},4,[111,332,37],{"class":161},[111,334,335],{"class":164},"DESCRIPTION\n",[111,337,339],{"class":157,"line":338},5,[111,340,341],{"class":314},"    Enumerates mailboxes with Get-EXOMailbox (Quota and Archive property sets), reads each mailbox's\n",[111,343,345],{"class":157,"line":344},6,[111,346,347],{"class":314},"    TotalItemSize and TotalDeletedItemSize with Get-EXOMailboxStatistics, and returns the mailboxes\n",[111,349,351],{"class":157,"line":350},7,[111,352,353],{"class":314},"    at or above a percentage of ProhibitSendQuota, with Recoverable Items usage against\n",[111,355,357],{"class":157,"line":356},8,[111,358,359],{"class":314},"    RecoverableItemsQuota alongside. Sorted with the most urgent mailboxes first. Optionally exports\n",[111,361,363],{"class":157,"line":362},9,[111,364,365],{"class":314},"    the report to CSV.\n",[111,367,369,371,374],{"class":157,"line":368},10,[111,370,37],{"class":161},[111,372,373],{"class":164},"PARAMETER",[111,375,376],{"class":164}," WarningPercent\n",[111,378,380],{"class":157,"line":379},11,[111,381,382],{"class":314},"    Percentage of ProhibitSendQuota used that puts a mailbox in the report. Defaults to 80.\n",[111,384,386,388,390],{"class":157,"line":385},12,[111,387,37],{"class":161},[111,389,373],{"class":164},[111,391,392],{"class":164}," RecipientTypeDetails\n",[111,394,396],{"class":157,"line":395},13,[111,397,398],{"class":314},"    Mailbox types to check. Defaults to UserMailbox and SharedMailbox.\n",[111,400,402,404,406],{"class":157,"line":401},14,[111,403,37],{"class":161},[111,405,373],{"class":164},[111,407,408],{"class":164}," OutputPath\n",[111,410,412],{"class":157,"line":411},15,[111,413,414],{"class":314},"    CSV path to export the report to. If omitted, the report only prints to the console.\n",[111,416,418,420],{"class":157,"line":417},16,[111,419,37],{"class":161},[111,421,422],{"class":164},"EXAMPLE\n",[111,424,426],{"class":157,"line":425},17,[111,427,428],{"class":314},"    .\\Get-MailboxQuotaReport.ps1 -WarningPercent 90 -OutputPath 'C:\\Reports\\mailbox-quota.csv'\n",[111,430,432,434],{"class":157,"line":431},18,[111,433,37],{"class":161},[111,435,436],{"class":164},"NOTES\n",[111,438,440],{"class":157,"line":439},19,[111,441,442],{"class":314},"    Author  : Thomas Lasswell (https:\u002F\u002Fwww.techcolumnist.com)\n",[111,444,446],{"class":157,"line":445},20,[111,447,448],{"class":314},"    Version : 1.0 (2025-09-03)\n",[111,450,452],{"class":157,"line":451},21,[111,453,454],{"class":314},"    Requires: ExchangeOnlineManagement 3.0.0 or later, an active Connect-ExchangeOnline session\n",[111,456,458],{"class":157,"line":457},22,[111,459,460],{"class":314},"#>\n",[111,462,464,467,470],{"class":157,"line":463},23,[111,465,466],{"class":168},"[",[111,468,469],{"class":161},"CmdletBinding",[111,471,472],{"class":168},"()]\n",[111,474,476,479],{"class":157,"line":475},24,[111,477,478],{"class":164},"param",[111,480,481],{"class":168}," (\n",[111,483,485,488,491,494,498,501,504],{"class":157,"line":484},25,[111,486,487],{"class":168},"    [",[111,489,490],{"class":161},"Parameter",[111,492,493],{"class":168},"(",[111,495,497],{"class":496},"s9osk","Mandatory",[111,499,500],{"class":164}," =",[111,502,503],{"class":161}," $false",[111,505,506],{"class":168},")]\n",[111,508,510,512,515,517,520,523,526],{"class":157,"line":509},26,[111,511,487],{"class":168},[111,513,514],{"class":161},"ValidateRange",[111,516,493],{"class":168},[111,518,519],{"class":161},"1",[111,521,522],{"class":164},",",[111,524,525],{"class":161}," 100",[111,527,506],{"class":168},[111,529,531,533,536,539,542,545],{"class":157,"line":530},27,[111,532,487],{"class":168},[111,534,535],{"class":164},"int",[111,537,538],{"class":168},"]$WarningPercent ",[111,540,541],{"class":164},"=",[111,543,544],{"class":161}," 80",[111,546,547],{"class":164},",\n",[111,549,551],{"class":157,"line":550},28,[111,552,554],{"emptyLinePlaceholder":553},true,"\n",[111,556,558,560,562,564,566,568,570],{"class":157,"line":557},29,[111,559,487],{"class":168},[111,561,490],{"class":161},[111,563,493],{"class":168},[111,565,497],{"class":496},[111,567,500],{"class":164},[111,569,503],{"class":161},[111,571,506],{"class":168},[111,573,575,577,580,583,585,588,590,593,595,598,601],{"class":157,"line":574},30,[111,576,487],{"class":168},[111,578,579],{"class":164},"string",[111,581,582],{"class":168},"[]]$RecipientTypeDetails ",[111,584,541],{"class":164},[111,586,587],{"class":164}," @",[111,589,493],{"class":168},[111,591,592],{"class":217},"'UserMailbox'",[111,594,522],{"class":164},[111,596,597],{"class":217}," 'SharedMailbox'",[111,599,600],{"class":168},")",[111,602,547],{"class":164},[111,604,606],{"class":157,"line":605},31,[111,607,554],{"emptyLinePlaceholder":553},[111,609,611,613,615,617,619,621,623],{"class":157,"line":610},32,[111,612,487],{"class":168},[111,614,490],{"class":161},[111,616,493],{"class":168},[111,618,497],{"class":496},[111,620,500],{"class":164},[111,622,503],{"class":161},[111,624,506],{"class":168},[111,626,628,630,632],{"class":157,"line":627},33,[111,629,487],{"class":168},[111,631,579],{"class":164},[111,633,634],{"class":168},"]$OutputPath\n",[111,636,638],{"class":157,"line":637},34,[111,639,640],{"class":168},")\n",[111,642,644],{"class":157,"line":643},35,[111,645,554],{"emptyLinePlaceholder":553},[111,647,649,652,656],{"class":157,"line":648},36,[111,650,651],{"class":164},"function",[111,653,655],{"class":654},"svObZ"," ConvertTo-ByteCount",[111,657,658],{"class":168}," {\n",[111,660,662,665],{"class":157,"line":661},37,[111,663,664],{"class":164},"    param",[111,666,667],{"class":168}," ($Size)\n",[111,669,671],{"class":157,"line":670},38,[111,672,554],{"emptyLinePlaceholder":553},[111,674,676],{"class":157,"line":675},39,[111,677,678],{"class":314},"    # Quotas and sizes arrive either as a ByteQuantifiedSize (with ToBytes()) or as its\n",[111,680,682],{"class":157,"line":681},40,[111,683,684],{"class":314},"    # string form, for example \"4.92 GB (5,283,165,983 bytes)\". \"Unlimited\" returns $null.\n",[111,686,688,691,694,697,700],{"class":157,"line":687},41,[111,689,690],{"class":164},"    if",[111,692,693],{"class":168}," (",[111,695,696],{"class":161},"$null",[111,698,699],{"class":164}," -eq",[111,701,702],{"class":168}," $Size) {\n",[111,704,706,709],{"class":157,"line":705},42,[111,707,708],{"class":164},"        return",[111,710,711],{"class":161}," $null\n",[111,713,715],{"class":157,"line":714},43,[111,716,717],{"class":168},"    }\n",[111,719,721,723,726,729,732,735,738,740,743,746],{"class":157,"line":720},44,[111,722,690],{"class":164},[111,724,725],{"class":168}," ($Size.PSObject.Properties[",[111,727,728],{"class":217},"'Value'",[111,730,731],{"class":168},"] ",[111,733,734],{"class":164},"-and",[111,736,737],{"class":168}," $Size.Value ",[111,739,734],{"class":164},[111,741,742],{"class":168}," $Size.Value.PSObject.Methods[",[111,744,745],{"class":217},"'ToBytes'",[111,747,748],{"class":168},"]) {\n",[111,750,752,754,757,760],{"class":157,"line":751},45,[111,753,708],{"class":164},[111,755,756],{"class":168}," [",[111,758,759],{"class":164},"double",[111,761,762],{"class":168},"]$Size.Value.ToBytes()\n",[111,764,766],{"class":157,"line":765},46,[111,767,717],{"class":168},[111,769,771,774,776],{"class":157,"line":770},47,[111,772,773],{"class":168},"    $text ",[111,775,541],{"class":164},[111,777,778],{"class":168}," $Size.ToString()\n",[111,780,782,784,787,790,793],{"class":157,"line":781},48,[111,783,690],{"class":164},[111,785,786],{"class":168}," ($text ",[111,788,789],{"class":164},"-match",[111,791,792],{"class":217}," '\\(([\\d,.\\s]+) bytes\\)'",[111,794,795],{"class":168},") {\n",[111,797,799,801,803,805,808,811,813,815,817,820,823,825,828],{"class":157,"line":798},49,[111,800,708],{"class":164},[111,802,756],{"class":168},[111,804,759],{"class":164},[111,806,807],{"class":168},"](",[111,809,810],{"class":161},"$Matches",[111,812,466],{"class":168},[111,814,519],{"class":161},[111,816,731],{"class":168},[111,818,819],{"class":164},"-replace",[111,821,822],{"class":217}," '[^\\d]'",[111,824,522],{"class":164},[111,826,827],{"class":217}," ''",[111,829,640],{"class":168},[111,831,833],{"class":157,"line":832},50,[111,834,717],{"class":168},[111,836,838,841],{"class":157,"line":837},51,[111,839,840],{"class":164},"    return",[111,842,711],{"class":161},[111,844,846],{"class":157,"line":845},52,[111,847,848],{"class":168},"}\n",[111,850,852],{"class":157,"line":851},53,[111,853,554],{"emptyLinePlaceholder":553},[111,855,857,860,862,865,867,870],{"class":157,"line":856},54,[111,858,859],{"class":164},"if",[111,861,693],{"class":168},[111,863,864],{"class":164},"-not",[111,866,693],{"class":168},[111,868,869],{"class":161},"Get-ConnectionInformation",[111,871,872],{"class":168},")) {\n",[111,874,876,879],{"class":157,"line":875},55,[111,877,878],{"class":164},"    throw",[111,880,881],{"class":217}," 'No Exchange Online session. Run Connect-ExchangeOnline first.'\n",[111,883,885],{"class":157,"line":884},56,[111,886,848],{"class":168},[111,888,890],{"class":157,"line":889},57,[111,891,554],{"emptyLinePlaceholder":553},[111,893,895,898],{"class":157,"line":894},58,[111,896,897],{"class":161},"Write-Verbose",[111,899,900],{"class":217}," 'Retrieving mailboxes'\n",[111,902,904,907,909,912,914,917,919,922,924,927,929],{"class":157,"line":903},59,[111,905,906],{"class":168},"$mailboxes ",[111,908,541],{"class":164},[111,910,911],{"class":161}," Get-EXOMailbox",[111,913,165],{"class":164},[111,915,916],{"class":168},"ResultSize Unlimited ",[111,918,211],{"class":164},[111,920,921],{"class":168},"RecipientTypeDetails $RecipientTypeDetails ",[111,923,211],{"class":164},[111,925,926],{"class":168},"PropertySets Quota",[111,928,522],{"class":164},[111,930,931],{"class":168}," Archive\n",[111,933,935],{"class":157,"line":934},60,[111,936,554],{"emptyLinePlaceholder":553},[111,938,940,943,945],{"class":157,"line":939},61,[111,941,942],{"class":168},"$checked ",[111,944,541],{"class":164},[111,946,947],{"class":161}," 0\n",[111,949,951,954,956,959,962,965],{"class":157,"line":950},62,[111,952,953],{"class":168},"$report ",[111,955,541],{"class":164},[111,957,958],{"class":164}," foreach",[111,960,961],{"class":168}," ($mailbox ",[111,963,964],{"class":164},"in",[111,966,967],{"class":168}," $mailboxes) {\n",[111,969,971,974,976,978,980],{"class":157,"line":970},63,[111,972,973],{"class":168},"    $quotaBytes ",[111,975,541],{"class":164},[111,977,655],{"class":161},[111,979,165],{"class":164},[111,981,982],{"class":168},"Size $mailbox.ProhibitSendQuota\n",[111,984,986,988,990,992],{"class":157,"line":985},64,[111,987,690],{"class":164},[111,989,693],{"class":168},[111,991,864],{"class":164},[111,993,994],{"class":168}," $quotaBytes) {\n",[111,996,998],{"class":157,"line":997},65,[111,999,1000],{"class":314},"        # Unlimited quota: nothing to measure against.\n",[111,1002,1004],{"class":157,"line":1003},66,[111,1005,1006],{"class":164},"        continue\n",[111,1008,1010],{"class":157,"line":1009},67,[111,1011,717],{"class":168},[111,1013,1015],{"class":157,"line":1014},68,[111,1016,554],{"emptyLinePlaceholder":553},[111,1018,1020],{"class":157,"line":1019},69,[111,1021,1022],{"class":314},"    # Never pass an empty identity: a $null Identity returns statistics for every mailbox.\n",[111,1024,1026,1028,1031,1033],{"class":157,"line":1025},70,[111,1027,690],{"class":164},[111,1029,1030],{"class":168}," ([",[111,1032,579],{"class":164},[111,1034,1035],{"class":168},"]::IsNullOrWhiteSpace($mailbox.UserPrincipalName)) {\n",[111,1037,1039],{"class":157,"line":1038},71,[111,1040,1006],{"class":164},[111,1042,1044],{"class":157,"line":1043},72,[111,1045,717],{"class":168},[111,1047,1049],{"class":157,"line":1048},73,[111,1050,554],{"emptyLinePlaceholder":553},[111,1052,1054,1057],{"class":157,"line":1053},74,[111,1055,1056],{"class":164},"    try",[111,1058,658],{"class":168},[111,1060,1062,1065,1067,1070,1072,1075,1077],{"class":157,"line":1061},75,[111,1063,1064],{"class":168},"        $stats ",[111,1066,541],{"class":164},[111,1068,1069],{"class":161}," Get-EXOMailboxStatistics",[111,1071,165],{"class":164},[111,1073,1074],{"class":168},"UserPrincipalName $mailbox.UserPrincipalName ",[111,1076,211],{"class":164},[111,1078,1079],{"class":168},"ErrorAction Stop\n",[111,1081,1083,1086,1089],{"class":157,"line":1082},76,[111,1084,1085],{"class":168},"    } ",[111,1087,1088],{"class":164},"catch",[111,1090,658],{"class":168},[111,1092,1094,1097,1100,1103,1105,1108,1110,1113,1115,1117,1120,1123,1125],{"class":157,"line":1093},77,[111,1095,1096],{"class":161},"        Write-Warning",[111,1098,1099],{"class":217}," \"Could not read statistics for ",[111,1101,1102],{"class":164},"$",[111,1104,493],{"class":217},[111,1106,1107],{"class":168},"$mailbox.UserPrincipalName",[111,1109,600],{"class":217},[111,1111,1112],{"class":217},": ",[111,1114,1102],{"class":164},[111,1116,493],{"class":217},[111,1118,1119],{"class":161},"$_",[111,1121,1122],{"class":168},".Exception.Message",[111,1124,600],{"class":217},[111,1126,1127],{"class":217},"\"\n",[111,1129,1131],{"class":157,"line":1130},78,[111,1132,1006],{"class":164},[111,1134,1136],{"class":157,"line":1135},79,[111,1137,717],{"class":168},[111,1139,1141,1144],{"class":157,"line":1140},80,[111,1142,1143],{"class":168},"    $checked",[111,1145,1146],{"class":164},"++\n",[111,1148,1150],{"class":157,"line":1149},81,[111,1151,554],{"emptyLinePlaceholder":553},[111,1153,1155,1158,1160,1162,1164],{"class":157,"line":1154},82,[111,1156,1157],{"class":168},"    $usedBytes ",[111,1159,541],{"class":164},[111,1161,655],{"class":161},[111,1163,165],{"class":164},[111,1165,1166],{"class":168},"Size $stats.TotalItemSize\n",[111,1168,1170,1172,1174,1176,1178],{"class":157,"line":1169},83,[111,1171,690],{"class":164},[111,1173,693],{"class":168},[111,1175,696],{"class":161},[111,1177,699],{"class":164},[111,1179,1180],{"class":168}," $usedBytes) {\n",[111,1182,1184],{"class":157,"line":1183},84,[111,1185,1006],{"class":164},[111,1187,1189],{"class":157,"line":1188},85,[111,1190,717],{"class":168},[111,1192,1194],{"class":157,"line":1193},86,[111,1195,554],{"emptyLinePlaceholder":553},[111,1197,1199,1202,1204,1206,1209,1212,1215,1218,1221,1223,1225,1228],{"class":157,"line":1198},87,[111,1200,1201],{"class":168},"    $percentUsed ",[111,1203,541],{"class":164},[111,1205,756],{"class":168},[111,1207,1208],{"class":164},"math",[111,1210,1211],{"class":168},"]::Round(($usedBytes ",[111,1213,1214],{"class":164},"\u002F",[111,1216,1217],{"class":168}," $quotaBytes) ",[111,1219,1220],{"class":164},"*",[111,1222,525],{"class":161},[111,1224,522],{"class":164},[111,1226,1227],{"class":161}," 1",[111,1229,640],{"class":168},[111,1231,1233,1235,1238,1241],{"class":157,"line":1232},88,[111,1234,690],{"class":164},[111,1236,1237],{"class":168}," ($percentUsed ",[111,1239,1240],{"class":164},"-lt",[111,1242,1243],{"class":168}," $WarningPercent) {\n",[111,1245,1247],{"class":157,"line":1246},89,[111,1248,1006],{"class":164},[111,1250,1252],{"class":157,"line":1251},90,[111,1253,717],{"class":168},[111,1255,1257],{"class":157,"line":1256},91,[111,1258,554],{"emptyLinePlaceholder":553},[111,1260,1262,1265,1267,1269,1271],{"class":157,"line":1261},92,[111,1263,1264],{"class":168},"    $deletedBytes ",[111,1266,541],{"class":164},[111,1268,655],{"class":161},[111,1270,165],{"class":164},[111,1272,1273],{"class":168},"Size $stats.TotalDeletedItemSize\n",[111,1275,1277,1280,1282,1284,1286],{"class":157,"line":1276},93,[111,1278,1279],{"class":168},"    $recoverableQuotaBytes ",[111,1281,541],{"class":164},[111,1283,655],{"class":161},[111,1285,165],{"class":164},[111,1287,1288],{"class":168},"Size $mailbox.RecoverableItemsQuota\n",[111,1290,1292,1295,1297],{"class":157,"line":1291},94,[111,1293,1294],{"class":168},"    $recoverablePercent ",[111,1296,541],{"class":164},[111,1298,711],{"class":161},[111,1300,1302,1304,1307,1309],{"class":157,"line":1301},95,[111,1303,690],{"class":164},[111,1305,1306],{"class":168}," ($deletedBytes ",[111,1308,734],{"class":164},[111,1310,1311],{"class":168}," $recoverableQuotaBytes) {\n",[111,1313,1315,1318,1320,1322,1324,1327,1329,1332,1334,1336,1338,1340],{"class":157,"line":1314},96,[111,1316,1317],{"class":168},"        $recoverablePercent ",[111,1319,541],{"class":164},[111,1321,756],{"class":168},[111,1323,1208],{"class":164},[111,1325,1326],{"class":168},"]::Round(($deletedBytes ",[111,1328,1214],{"class":164},[111,1330,1331],{"class":168}," $recoverableQuotaBytes) ",[111,1333,1220],{"class":164},[111,1335,525],{"class":161},[111,1337,522],{"class":164},[111,1339,1227],{"class":161},[111,1341,640],{"class":168},[111,1343,1345],{"class":157,"line":1344},97,[111,1346,717],{"class":168},[111,1348,1350],{"class":157,"line":1349},98,[111,1351,554],{"emptyLinePlaceholder":553},[111,1353,1355,1357,1360,1363,1366],{"class":157,"line":1354},99,[111,1356,487],{"class":168},[111,1358,1359],{"class":164},"PSCustomObject",[111,1361,1362],{"class":168},"]",[111,1364,1365],{"class":164},"@",[111,1367,1368],{"class":168},"{\n",[111,1370,1372,1375,1377],{"class":157,"line":1371},100,[111,1373,1374],{"class":168},"        DisplayName        ",[111,1376,541],{"class":164},[111,1378,1379],{"class":168}," $mailbox.DisplayName\n",[111,1381,1383,1386,1388],{"class":157,"line":1382},101,[111,1384,1385],{"class":168},"        Mailbox            ",[111,1387,541],{"class":164},[111,1389,1390],{"class":168}," $mailbox.PrimarySmtpAddress\n",[111,1392,1394,1397,1399],{"class":157,"line":1393},102,[111,1395,1396],{"class":168},"        Type               ",[111,1398,541],{"class":164},[111,1400,1401],{"class":168}," $mailbox.RecipientTypeDetails\n",[111,1403,1405,1408,1410,1412,1414,1417,1419,1421,1424,1426],{"class":157,"line":1404},103,[111,1406,1407],{"class":168},"        UsedGB             ",[111,1409,541],{"class":164},[111,1411,756],{"class":168},[111,1413,1208],{"class":164},[111,1415,1416],{"class":168},"]::Round($usedBytes ",[111,1418,1214],{"class":164},[111,1420,1227],{"class":161},[111,1422,1423],{"class":164},"GB,",[111,1425,1227],{"class":161},[111,1427,640],{"class":168},[111,1429,1431,1434,1436,1438,1440,1443,1445,1447,1449,1451],{"class":157,"line":1430},104,[111,1432,1433],{"class":168},"        QuotaGB            ",[111,1435,541],{"class":164},[111,1437,756],{"class":168},[111,1439,1208],{"class":164},[111,1441,1442],{"class":168},"]::Round($quotaBytes ",[111,1444,1214],{"class":164},[111,1446,1227],{"class":161},[111,1448,1423],{"class":164},[111,1450,1227],{"class":161},[111,1452,640],{"class":168},[111,1454,1456,1459,1461],{"class":157,"line":1455},105,[111,1457,1458],{"class":168},"        PercentUsed        ",[111,1460,541],{"class":164},[111,1462,1463],{"class":168}," $percentUsed\n",[111,1465,1467,1470,1472,1475,1478,1480,1483,1485,1487,1489,1491,1494,1497,1500,1503],{"class":157,"line":1466},106,[111,1468,1469],{"class":168},"        RecoverableGB      ",[111,1471,541],{"class":164},[111,1473,1474],{"class":164}," if",[111,1476,1477],{"class":168}," ($deletedBytes) { [",[111,1479,1208],{"class":164},[111,1481,1482],{"class":168},"]::Round($deletedBytes ",[111,1484,1214],{"class":164},[111,1486,1227],{"class":161},[111,1488,1423],{"class":164},[111,1490,1227],{"class":161},[111,1492,1493],{"class":168},") } ",[111,1495,1496],{"class":164},"else",[111,1498,1499],{"class":168}," { ",[111,1501,1502],{"class":161},"0",[111,1504,1505],{"class":168}," }\n",[111,1507,1509,1512,1514],{"class":157,"line":1508},107,[111,1510,1511],{"class":168},"        RecoverablePercent ",[111,1513,541],{"class":164},[111,1515,1516],{"class":168}," $recoverablePercent\n",[111,1518,1520,1523,1525,1528,1531],{"class":157,"line":1519},108,[111,1521,1522],{"class":168},"        ArchiveEnabled     ",[111,1524,541],{"class":164},[111,1526,1527],{"class":168}," $mailbox.ArchiveStatus ",[111,1529,1530],{"class":164},"-eq",[111,1532,1533],{"class":217}," 'Active'\n",[111,1535,1537],{"class":157,"line":1536},109,[111,1538,717],{"class":168},[111,1540,1542],{"class":157,"line":1541},110,[111,1543,848],{"class":168},[111,1545,1547],{"class":157,"line":1546},111,[111,1548,554],{"emptyLinePlaceholder":553},[111,1550,1552,1555,1557,1559,1562,1565,1568,1570,1573,1575],{"class":157,"line":1551},112,[111,1553,1554],{"class":168},"$sortedReport ",[111,1556,541],{"class":164},[111,1558,587],{"class":164},[111,1560,1561],{"class":168},"($report ",[111,1563,1564],{"class":164},"|",[111,1566,1567],{"class":161}," Sort-Object",[111,1569,165],{"class":164},[111,1571,1572],{"class":168},"Property PercentUsed ",[111,1574,211],{"class":164},[111,1576,1577],{"class":168},"Descending)\n",[111,1579,1581],{"class":157,"line":1580},113,[111,1582,554],{"emptyLinePlaceholder":553},[111,1584,1586,1589,1591,1594,1597,1600,1602,1605,1607],{"class":157,"line":1585},114,[111,1587,1588],{"class":161},"Write-Host",[111,1590,693],{"class":168},[111,1592,1593],{"class":217},"\"Checked {0:N0} mailbox(es); {1} at or above {2}% of ProhibitSendQuota.\"",[111,1595,1596],{"class":164}," -f",[111,1598,1599],{"class":168}," $checked",[111,1601,522],{"class":164},[111,1603,1604],{"class":168}," $sortedReport.Count",[111,1606,522],{"class":164},[111,1608,1609],{"class":168}," $WarningPercent)\n",[111,1611,1613,1615,1617,1620,1622,1625,1627,1630,1632,1635,1637,1640,1642,1645,1647,1650,1652,1655,1657,1660,1662],{"class":157,"line":1612},115,[111,1614,1554],{"class":168},[111,1616,1564],{"class":164},[111,1618,1619],{"class":161}," Format-Table",[111,1621,165],{"class":164},[111,1623,1624],{"class":168},"Property DisplayName",[111,1626,522],{"class":164},[111,1628,1629],{"class":168}," Type",[111,1631,522],{"class":164},[111,1633,1634],{"class":168}," UsedGB",[111,1636,522],{"class":164},[111,1638,1639],{"class":168}," QuotaGB",[111,1641,522],{"class":164},[111,1643,1644],{"class":168}," PercentUsed",[111,1646,522],{"class":164},[111,1648,1649],{"class":168}," RecoverableGB",[111,1651,522],{"class":164},[111,1653,1654],{"class":168}," RecoverablePercent",[111,1656,522],{"class":164},[111,1658,1659],{"class":168}," ArchiveEnabled ",[111,1661,211],{"class":164},[111,1663,1664],{"class":168},"AutoSize\n",[111,1666,1668],{"class":157,"line":1667},116,[111,1669,554],{"emptyLinePlaceholder":553},[111,1671,1673,1675],{"class":157,"line":1672},117,[111,1674,859],{"class":164},[111,1676,1677],{"class":168}," ($OutputPath) {\n",[111,1679,1681,1684,1686,1689,1691,1694,1696,1699,1701],{"class":157,"line":1680},118,[111,1682,1683],{"class":168},"    $sortedReport ",[111,1685,1564],{"class":164},[111,1687,1688],{"class":161}," Export-Csv",[111,1690,165],{"class":164},[111,1692,1693],{"class":168},"Path $OutputPath ",[111,1695,211],{"class":164},[111,1697,1698],{"class":168},"NoTypeInformation ",[111,1700,211],{"class":164},[111,1702,1703],{"class":168},"Encoding UTF8\n",[111,1705,1707,1710,1713,1716],{"class":157,"line":1706},119,[111,1708,1709],{"class":161},"    Write-Host",[111,1711,1712],{"class":217}," \"Report exported to ",[111,1714,1715],{"class":168},"$OutputPath",[111,1717,1127],{"class":217},[111,1719,1721],{"class":157,"line":1720},120,[111,1722,848],{"class":168},[20,1724,1726],{"id":1725},"notes","Notes",[25,1728,1729,1800,1831,1850,1860,1875,1892],{},[28,1730,1731,1739,1740,121,1743,1746,1747,1749,1750,1753,1754,1757,1758,1760,1761,1764,1765,1768,1769,1771,1772,1771,1775,1771,1778,121,1781,1784,1785,1788,1789,1792,1793,121,1796,1799],{},[1732,1733,1734,1735,1738],"strong",{},"Why the ",[15,1736,1737],{},"Get-EXO*"," cmdlets."," The original draft used ",[15,1741,1742],{},"Get-Mailbox",[15,1744,1745],{},"Get-MailboxStatistics",". Microsoft's guidance for the V3 module is to use the REST-backed ",[15,1748,1737],{}," cmdlets with property sets: without ",[15,1751,1752],{},"-PropertySets"," or ",[15,1755,1756],{},"-Properties"," you get only the Minimum set, and a ",[15,1759,1742],{}," call returns at least 230 properties per mailbox where ",[15,1762,1763],{},"Get-EXOMailbox"," returns a handful. The ",[15,1766,1767],{},"Quota"," property set carries ",[15,1770,17],{},", ",[15,1773,1774],{},"IssueWarningQuota",[15,1776,1777],{},"ProhibitSendReceiveQuota",[15,1779,1780],{},"RecoverableItemsQuota",[15,1782,1783],{},"UseDatabaseQuotaDefaults",", and the ",[15,1786,1787],{},"Minimum"," set of ",[15,1790,1791],{},"Get-EXOMailboxStatistics"," already includes ",[15,1794,1795],{},"TotalItemSize",[15,1797,1798],{},"TotalDeletedItemSize",", so no extra properties are requested for statistics.",[28,1801,1802,1805,1806,1809,1810,1812,1813,1816,1817,1820,1821,1824,1825,1827,1828,37],{},[1732,1803,1804],{},"Size parsing."," The old draft called ",[15,1807,1808],{},".Value.ToBytes()"," directly on ",[15,1811,1795],{},". That works when the object is a live ",[15,1814,1815],{},"ByteQuantifiedSize",", and fails when it arrives as its string form (",[15,1818,1819],{},"\"4.92 GB (5,283,165,983 bytes)\"","), which is what you often get over the REST module. ",[15,1822,1823],{},"ConvertTo-ByteCount"," handles both and returns ",[15,1826,696],{}," for ",[15,1829,1830],{},"Unlimited",[28,1832,1833,1839,1840,1842,1843,1845,1846,1849],{},[1732,1834,1835,1836,1838],{},"The ",[15,1837,696],{}," identity trap."," Microsoft's reference for ",[15,1841,1791],{}," warns that ",[15,1844,696],{}," or a non-existent value for ",[15,1847,1848],{},"-Identity"," returns every object, as if you had run the command with no identity at all. In a loop that turns one bad row into a full-tenant query, which is why the script skips blank UPNs.",[28,1851,1852,1855,1856,1859],{},[1732,1853,1854],{},"Quotas come from licensing."," In Exchange Online the quota values are set by the subscription and license assigned to the mailbox. You can lower them with ",[15,1857,1858],{},"Set-Mailbox -ProhibitSendQuota",", but you can't raise them past what the license allows. For example, Exchange Online Plan 1 and Office 365 E1 mailboxes prohibit send at 49.5 GB, while unlicensed shared mailboxes are limited to 50 GB until an Exchange Online Plan 2 license raises them to 100 GB.",[28,1861,1862,1867,1868,1870,1871,1874],{},[1732,1863,1864,1866],{},[15,1865,1795],{}," doesn't include Recoverable Items."," Deleted items that are still recoverable count against ",[15,1869,1780],{}," (30 GB, or 100 GB when the mailbox is on hold), reported here as ",[15,1872,1873],{},"RecoverableGB",". A mailbox on litigation hold can run out of Recoverable Items space while its main quota looks healthy, which is why that column is in the report.",[28,1876,1877,1880,1881,1884,1885,1887,1888,1891],{},[1732,1878,1879],{},"Archives."," Archive mailboxes aren't measured; add ",[15,1882,1883],{},"-Archive"," to a second ",[15,1886,1791],{}," call if you need them. ",[15,1889,1890],{},"ArchiveEnabled"," tells you whether moving mail to the archive with a retention policy is an option. Microsoft notes that retention policies only move mail to the archive automatically once the primary mailbox is larger than 10 MB, which isn't a constraint for anything this report flags.",[28,1893,1894],{},"On a tenant with thousands of mailboxes this is one statistics call per mailbox with a quota, so it takes a while. I run it as a nightly scheduled task rather than on demand.",[20,1896,1898],{"id":1897},"source","Source",[25,1900,1901,1910,1917,1923,1929,1936,1943],{},[28,1902,1903],{},[1904,1905,1909],"a",{"href":1906,"rel":1907},"https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpowershell\u002Fexchange\u002Fexchange-online-powershell-v2",[1908],"nofollow","About the Exchange Online PowerShell V3 module (properties and property sets)",[28,1911,1912],{},[1904,1913,1916],{"href":1914,"rel":1915},"https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpowershell\u002Fexchange\u002Fcmdlet-property-sets",[1908],"Property sets in Exchange Online PowerShell module cmdlets",[28,1918,1919],{},[1904,1920,1791],{"href":1921,"rel":1922},"https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpowershell\u002Fmodule\u002Fexchangepowershell\u002Fget-exomailboxstatistics",[1908],[28,1924,1925],{},[1904,1926,1763],{"href":1927,"rel":1928},"https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpowershell\u002Fmodule\u002Fexchangepowershell\u002Fget-exomailbox",[1908],[28,1930,1931],{},[1904,1932,1935],{"href":1933,"rel":1934},"https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpowershell\u002Fmodule\u002Fexchangepowershell\u002Fset-mailbox",[1908],"Set-Mailbox (ProhibitSendQuota)",[28,1937,1938],{},[1904,1939,1942],{"href":1940,"rel":1941},"https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Foffice365\u002Fservicedescriptions\u002Fexchange-online-service-description\u002Fexchange-online-limits",[1908],"Exchange Online limits (capacity alerts, Recoverable Items quotas)",[28,1944,1945],{},[1904,1946,1949],{"href":1947,"rel":1948},"https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpowershell\u002Fexchange\u002Fapp-only-auth-powershell-v2",[1908],"App-only authentication for unattended scripts in Exchange Online PowerShell",[1951,1952,1953],"style",{},"html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}html pre.shiki code .s9osk, html code.shiki .s9osk{--shiki-default:#FFAB70}html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}",{"title":152,"searchDepth":175,"depth":175,"links":1955},[1956,1957,1958,1959,1960,1961],{"id":22,"depth":175,"text":23},{"id":50,"depth":175,"text":51},{"id":141,"depth":175,"text":142},{"id":303,"depth":175,"text":304},{"id":1725,"depth":175,"text":1726},{"id":1897,"depth":175,"text":1898},"techcolumnist",[1964,1965],"ps","scripts","2025-09-03T14:00:00Z","Flag Exchange Online mailboxes above a percentage of their ProhibitSendQuota, plus Recoverable Items pressure, using the EXO V3 Get-EXO cmdlets.","md",false,null,{},"\u002Fblog\u002F2025\u002F09\u002F03\u002Fpowershell-exchange-online-report-mailboxes-approaching-their-quota",{"title":6,"description":1967},[1962],"blog\u002F2025\u002F09\u002F03\u002Fpowershell-exchange-online-report-mailboxes-approaching-their-quota",[151,1977,1978],"exchange-online","reporting","\u002F2025\u002F09\u002F03\u002Fpowershell-exchange-online-report-mailboxes-approaching-their-quota\u002F","beFvcPYO-llSIq_T4pvliFsyuL6oFRhUZviBsUbib5A",{"title":1982,"description":1983,"date":1984,"url":1985,"categories":1986,"tags":1987,"image":1970,"readingTime":344,"canonical":1962,"sites":1990,"series":1970,"seriesOrder":1970},"PowerShell: Intune – Remediation Script for Stuck BitLocker Encryption","An Intune Remediations detect and remediate pair that finds paused, suspended or stalled BitLocker encryption on Windows and fixes the cases that have a documented fix.","2025-09-10T14:00:00Z","\u002F2025\u002F09\u002F10\u002Fpowershell-intune-remediation-script-for-stuck-bitlocker-encryption\u002F",[1964,1965],[151,1988,1989],"intune","windows",[1962],{"title":1992,"description":1993,"date":1994,"url":1995,"categories":1996,"tags":1997,"image":1970,"readingTime":279,"canonical":1962,"sites":2000,"series":1970,"seriesOrder":1970},"PowerShell: Windows – Inventory Installed Software Across a Domain","A script that reads the Uninstall registry keys on many Windows computers in parallel over PowerShell remoting and writes one CSV, without touching Win32_Product.","2025-08-27T14:00:00Z","\u002F2025\u002F08\u002F27\u002Fpowershell-windows-inventory-installed-software-across-a-domain\u002F",[1964,1965],[151,1989,1998,1999],"discovery","active-directory",[1962],[2002,2010,2020],{"title":2003,"description":2004,"date":2005,"url":2006,"categories":2007,"tags":2008,"image":1970,"readingTime":338,"canonical":1962,"sites":2009,"series":1970,"seriesOrder":1970},"PowerShell: Active Directory – Report Group Membership Sprawl","Rank AD security groups by nesting depth, transitive member count, ownership and staleness for an access review, plus a per-user Kerberos token size estimate.","2025-12-03T14:00:00Z","\u002F2025\u002F12\u002F03\u002Fpowershell-active-directory-report-group-membership-sprawl\u002F",[1964,1965],[151,1999,1978],[1962],{"title":2011,"description":2012,"date":2013,"url":2014,"categories":2015,"tags":2016,"image":1970,"readingTime":158,"canonical":1962,"sites":2018,"series":1970,"seriesOrder":1970},"PowerShell: Get Exchange Mailboxes Over XXGB","Simple command turned crazy. I ended up coming up with this due to the fact we have duplicate display names and needed to update for Exchange Online to get mailbox sizes.","2021-02-18T14:46:29Z","\u002F2021\u002F02\u002F18\u002Fpowershell-get-exchange-mailboxes-over-xxgb\u002F",[1964,1965],[151,2017,1977],"exchange",[2019,1962],"lasswell",{"title":2021,"description":2022,"date":2023,"url":2024,"categories":2025,"tags":2026,"image":1970,"readingTime":330,"canonical":1962,"sites":2027,"series":1970,"seriesOrder":1970},"PowerShell: Windows Server – Disable SMBv1 Fleet-Wide and Verify","A script that audits SMBv1 access (event 3000), disables the SMBv1 server and optional feature across Windows servers, and reports which ones still need a restart.","2025-11-26T14:00:00Z","\u002F2025\u002F11\u002F26\u002Fpowershell-windows-server-disable-smbv1-fleet-wide-and-verify-it-stuck\u002F",[1964,1965],[151,1989],[1962],{"doc":1970,"posts":2029},[],1790052513170]