Skip to content

Commit

Permalink
Merge pull request #473 from kris6673/UserEmailSettings-recipientType…
Browse files Browse the repository at this point in the history
…Details-API

Add mailbox type to Email settings pane under list user-API
  • Loading branch information
KelvinTegelaar authored Nov 13, 2023
2 parents de70881 + 7326d40 commit c6ad777
Showing 1 changed file with 24 additions and 22 deletions.
46 changes: 24 additions & 22 deletions ListUserMailboxDetails/run.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -97,28 +97,29 @@ else {
}

if ($ArchiveSize) {
$GraphRequest = [ordered]@{
ForwardAndDeliver = $MailboxDetailedRequest.DeliverToMailboxAndForward
ForwardingAddress = $ForwardingAddress
LitiationHold = $MailboxDetailedRequest.LitigationHoldEnabled
HiddenFromAddressLists = $MailboxDetailedRequest.HiddenFromAddressListsEnabled
EWSEnabled = $CASRequest.EwsEnabled
MailboxMAPIEnabled = $CASRequest.MAPIEnabled
MailboxOWAEnabled = $CASRequest.OWAEnabled
MailboxImapEnabled = $CASRequest.ImapEnabled
MailboxPopEnabled = $CASRequest.PopEnabled
MailboxActiveSyncEnabled = $CASRequest.ActiveSyncEnabled
Permissions = $ParsedPerms
ProhibitSendQuota = [math]::Round([float]($MailboxDetailedRequest.ProhibitSendQuota -split ' GB')[0], 2)
ProhibitSendReceiveQuota = [math]::Round([float]($MailboxDetailedRequest.ProhibitSendReceiveQuota -split ' GB')[0], 2)
ItemCount = [math]::Round($StatsRequest.ItemCount, 2)
TotalItemSize = [math]::Round($StatsRequest.TotalItemSize / 1Gb, 2)
TotalArchiveItemSize = $ArchiveSize.totalItemSize.split('(')[0]
TotalArchiveItemCount = [math]::Round($ArchiveSize.ItemCount, 2)
BlockedForSpam = $BlockedForSpam
ArchiveMailBox = $ArchiveEnabled
AutoExpandingArchive = $Archive.AutoExpandingArchiveEnabled
}
$GraphRequest = [ordered]@{
ForwardAndDeliver = $MailboxDetailedRequest.DeliverToMailboxAndForward
ForwardingAddress = $ForwardingAddress
LitiationHold = $MailboxDetailedRequest.LitigationHoldEnabled
HiddenFromAddressLists = $MailboxDetailedRequest.HiddenFromAddressListsEnabled
EWSEnabled = $CASRequest.EwsEnabled
MailboxMAPIEnabled = $CASRequest.MAPIEnabled
MailboxOWAEnabled = $CASRequest.OWAEnabled
MailboxImapEnabled = $CASRequest.ImapEnabled
MailboxPopEnabled = $CASRequest.PopEnabled
MailboxActiveSyncEnabled = $CASRequest.ActiveSyncEnabled
Permissions = $ParsedPerms
ProhibitSendQuota = [math]::Round([float]($MailboxDetailedRequest.ProhibitSendQuota -split ' GB')[0], 2)
ProhibitSendReceiveQuota = [math]::Round([float]($MailboxDetailedRequest.ProhibitSendReceiveQuota -split ' GB')[0], 2)
ItemCount = [math]::Round($StatsRequest.ItemCount, 2)
TotalItemSize = [math]::Round($StatsRequest.TotalItemSize / 1Gb, 2)
TotalArchiveItemSize = $ArchiveSize.totalItemSize.split('(')[0]
TotalArchiveItemCount = [math]::Round($ArchiveSize.ItemCount, 2)
BlockedForSpam = $BlockedForSpam
ArchiveMailBox = $ArchiveEnabled
AutoExpandingArchive = $Archive.AutoExpandingArchiveEnabled
RecipientTypeDetails = $MailboxDetailedRequest.RecipientTypeDetails
}
}
else {
$GraphRequest = [ordered]@{
Expand All @@ -142,6 +143,7 @@ else {
BlockedForSpam = $BlockedForSpam
ArchiveMailBox = $ArchiveEnabled
AutoExpandingArchive = $Archive.AutoExpandingArchiveEnabled
RecipientTypeDetails = $MailboxDetailedRequest.RecipientTypeDetails
}
}

Expand Down

0 comments on commit c6ad777

Please sign in to comment.