Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
NikCharlebois committed Jul 4, 2023
1 parent 766ebf2 commit 5be4bd7
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 24 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change log for Microsoft365DSC

# UNRELEASED

* EXOMailboxPlan
* Support comparing instances without the GUID in the name.
FIXES [#3314](https://github.com/microsoft/Microsoft365DSC/issues/3314)

# 1.23.628.1

* AADAdministrativeUnit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,33 +111,36 @@ function Get-TargetResource
if ($null -eq $MailboxPlan)
{
Write-Verbose -Message "MailboxPlan $($Identity) does not exist."
return $nullResult
}
else
{
$result = @{
Identity = $Identity
IssueWarningQuota = $MailboxPlan.IssueWarningQuota
MaxReceiveSize = $MailboxPlan.MaxReceiveSize
MaxSendSize = $MailboxPlan.MaxSendSize
ProhibitSendQuota = $MailboxPlan.ProhibitSendQuota
ProhibitSendReceiveQuota = $MailboxPlan.ProhibitSendReceiveQuota
RetainDeletedItemsFor = $MailboxPlan.RetainDeletedItemsFor
RetentionPolicy = $MailboxPlan.RetentionPolicy
RoleAssignmentPolicy = $MailboxPlan.RoleAssignmentPolicy
Credential = $Credential
ApplicationId = $ApplicationId
CertificateThumbprint = $CertificateThumbprint
CertificatePath = $CertificatePath
CertificatePassword = $CertificatePassword
Managedidentity = $ManagedIdentity.IsPresent
TenantId = $TenantId

$MailboxPlan = Get-MailboxPlan -Filter "Name like '$($Identity.Split('-')[0])*'"
if ($null -eq $MailboxPlan)
{
return $nullResult
}
}

Write-Verbose -Message "Found MailboxPlan $($Identity)"
Write-Verbose -Message "Get-TargetResource Result: `n $(Convert-M365DscHashtableToString -Hashtable $result)"
return $result
$result = @{
Identity = $Identity
IssueWarningQuota = $MailboxPlan.IssueWarningQuota
MaxReceiveSize = $MailboxPlan.MaxReceiveSize
MaxSendSize = $MailboxPlan.MaxSendSize
ProhibitSendQuota = $MailboxPlan.ProhibitSendQuota
ProhibitSendReceiveQuota = $MailboxPlan.ProhibitSendReceiveQuota
RetainDeletedItemsFor = $MailboxPlan.RetainDeletedItemsFor
RetentionPolicy = $MailboxPlan.RetentionPolicy
RoleAssignmentPolicy = $MailboxPlan.RoleAssignmentPolicy
Credential = $Credential
ApplicationId = $ApplicationId
CertificateThumbprint = $CertificateThumbprint
CertificatePath = $CertificatePath
CertificatePassword = $CertificatePassword
Managedidentity = $ManagedIdentity.IsPresent
TenantId = $TenantId
}

Write-Verbose -Message "Found MailboxPlan $($Identity)"
Write-Verbose -Message "Get-TargetResource Result: `n $(Convert-M365DscHashtableToString -Hashtable $result)"
return $result
}
catch
{
Expand Down

0 comments on commit 5be4bd7

Please sign in to comment.