Skip to content

Commit 7ca41ce

Browse files
committed
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP-API into dev
2 parents 14d455f + 00b1a51 commit 7ca41ce

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
function Get-ExoOnlineStringBytes {
2+
param([string]$SizeString)
3+
4+
# This exists because various exo cmdlets like to return a human readable string like "3.322 KB (3,402 bytes)" but not the raw bytes value
5+
6+
if ($SizeString -match '\(([0-9,]+) bytes\)') {
7+
return [int]($Matches[1] -replace ',','')
8+
}
9+
10+
return 0
11+
}

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Identity/Administration/Users/Invoke-ListUserMailboxDetails.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ function Invoke-ListUserMailboxDetails {
164164
$ProhibitSendQuotaString = $MailboxDetailedRequest.ProhibitSendQuota -split ' '
165165
$ProhibitSendReceiveQuotaString = $MailboxDetailedRequest.ProhibitSendReceiveQuota -split ' '
166166
$TotalItemSizeString = $StatsRequest.TotalItemSize -split ' '
167-
$TotalArchiveItemSizeString = $ArchiveSizeRequest.TotalItemSize -split ' '
167+
$TotalArchiveItemSizeString = Get-ExoOnlineStringBytes -SizeString $ArchiveSizeRequest.TotalItemSize.Value
168168

169169
$ProhibitSendQuota = try { [math]::Round([float]($ProhibitSendQuotaString[0]), 2) } catch { 0 }
170170
$ProhibitSendReceiveQuota = try { [math]::Round([float]($ProhibitSendReceiveQuotaString[0]), 2) } catch { 0 }

0 commit comments

Comments
 (0)