From 2e6236b2600e9b2f67efdcff1f37b11df0bb992d Mon Sep 17 00:00:00 2001 From: Svilen Sultanov Date: Tue, 21 Apr 2020 22:01:35 +0200 Subject: [PATCH 1/4] fixing the bugs in mailbox db ressource --- .../MSFT_xExchMailboxDatabase.psm1 | 8 ++++---- .../MSFT_xExchMailboxDatabase.Integration.Tests.ps1 | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/DSCResources/MSFT_xExchMailboxDatabase/MSFT_xExchMailboxDatabase.psm1 b/source/DSCResources/MSFT_xExchMailboxDatabase/MSFT_xExchMailboxDatabase.psm1 index 0edd0ba4..8b31355c 100644 --- a/source/DSCResources/MSFT_xExchMailboxDatabase/MSFT_xExchMailboxDatabase.psm1 +++ b/source/DSCResources/MSFT_xExchMailboxDatabase/MSFT_xExchMailboxDatabase.psm1 @@ -796,7 +796,7 @@ function Set-TargetResource # setup params Add-ToPSBoundParametersFromHashtable -PSBoundParametersIn $PSBoundParameters -ParamsToAdd @{ - 'Name' = $Name + 'Identity' = $Name } Remove-FromPSBoundParametersUsingHashtable -PSBoundParametersIn $PSBoundParameters ` -ParamsToRemove 'Name', 'Server', 'DatabaseCopyCount', 'AllowServiceRestart', 'EdbFilePath', 'LogFolderPath', 'Credential', 'AdServerSettingsPreferredServer', 'SkipInitialDatabaseMount' @@ -1650,7 +1650,7 @@ function Get-MailboxDatabaseInternal ) Add-ToPSBoundParametersFromHashtable -PSBoundParametersIn $PSBoundParameters -ParamsToAdd @{ - 'Name' = $Name + 'Identity' = $Name } Remove-FromPSBoundParametersUsingHashtable -PSBoundParametersIn $PSBoundParameters -ParamsToKeep 'Identity', 'DomainController' @@ -1968,7 +1968,7 @@ function Move-DatabaseOrLogPath ) Add-ToPSBoundParametersFromHashtable -PSBoundParametersIn $PSBoundParameters -ParamsToAdd @{ - 'Name' = $Name + 'Identity' = $Name } Remove-FromPSBoundParametersUsingHashtable -PSBoundParametersIn $PSBoundParameters -ParamsToKeep 'Identity', 'DomainController', 'EdbFilePath', 'LogFolderPath' @@ -2285,7 +2285,7 @@ function Mount-DatabaseInternal ) Add-ToPSBoundParametersFromHashtable -PSBoundParametersIn $PSBoundParameters -ParamsToAdd @{ - 'Name' = $Name + 'Identity' = $Name } Remove-FromPSBoundParametersUsingHashtable -PSBoundParametersIn $PSBoundParameters -ParamsToKeep 'Identity', 'DomainController' diff --git a/tests/Integration/MSFT_xExchMailboxDatabase.Integration.Tests.ps1 b/tests/Integration/MSFT_xExchMailboxDatabase.Integration.Tests.ps1 index 3b40a73a..a4d064fe 100644 --- a/tests/Integration/MSFT_xExchMailboxDatabase.Integration.Tests.ps1 +++ b/tests/Integration/MSFT_xExchMailboxDatabase.Integration.Tests.ps1 @@ -104,7 +104,7 @@ if ($exchangeInstalled) ProhibitSendQuota = '1GB' ProhibitSendReceiveQuota = '1.5 GB' RecoverableItemsQuota = 'uNlImItEd' - RecoverableItemsWarningQuota = '1,000,448' + RecoverableItemsWarningQuota = '1000448' } $expectedGetResults = @{ From 0d0de423c505c6dfcdf719d0c5df028397188ec1 Mon Sep 17 00:00:00 2001 From: Svilen Sultanov Date: Tue, 21 Apr 2020 22:34:25 +0200 Subject: [PATCH 2/4] fixing the integration tests --- ...MSFT_xExchMailboxDatabase.Integration.Tests.ps1 | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/Integration/MSFT_xExchMailboxDatabase.Integration.Tests.ps1 b/tests/Integration/MSFT_xExchMailboxDatabase.Integration.Tests.ps1 index a4d064fe..06fe6428 100644 --- a/tests/Integration/MSFT_xExchMailboxDatabase.Integration.Tests.ps1 +++ b/tests/Integration/MSFT_xExchMailboxDatabase.Integration.Tests.ps1 @@ -58,7 +58,7 @@ if ($exchangeInstalled) # Get required credentials to use for the test $shellCredentials = Get-TestCredential - Get-RemoteExchangeSession -Credential $shellCredentials -CommandsToLoad '*-MailboxDatabase', '*-Mailbox', '*-Recipient', 'Get-AcceptedDomain' + Get-RemoteExchangeSession -Credential $shellCredentials -CommandsToLoad '*-MailboxDatabase', '*-Mailbox', '*-Recipient', 'Get-AcceptedDomain', '*-OfflineAddressBook' -Verbose $TestDBName = 'Mailbox Database Test 123' @@ -102,8 +102,8 @@ if ($exchangeInstalled) RetainDeletedItemsUntilBackup = $false IssueWarningQuota = '27 MB' ProhibitSendQuota = '1GB' - ProhibitSendReceiveQuota = '1.5 GB' - RecoverableItemsQuota = 'uNlImItEd' + ProhibitSendReceiveQuota = '1,5 GB' + RecoverableItemsQuota = 'unlimited' RecoverableItemsWarningQuota = '1000448' } @@ -131,7 +131,7 @@ if ($exchangeInstalled) IssueWarningQuota = '27 MB (28,311,552 bytes)' ProhibitSendQuota = '1 GB (1,073,741,824 bytes)' ProhibitSendReceiveQuota = '1.5 GB (1,610,612,736 bytes)' - RecoverableItemsQuota = 'uNlImItEd' + RecoverableItemsQuota = 'unlimited' RecoverableItemsWarningQuota = '977 KB (1,000,448 bytes)' } @@ -160,9 +160,9 @@ if ($exchangeInstalled) $testParams.RetainDeletedItemsUntilBackup = $true $testParams.IssueWarningQuota = '28 MB' $testParams.ProhibitSendQuota = '2GB' - $testParams.ProhibitSendReceiveQuota = '2.5 GB' + $testParams.ProhibitSendReceiveQuota = '2,5 GB' $testParams.RecoverableItemsQuota = '2 GB' - $testParams.RecoverableItemsWarningQuota = '1.5 GB' + $testParams.RecoverableItemsWarningQuota = '1,5 GB' $expectedGetResults.AllowFileRestore = $false $expectedGetResults.CalendarLoggingQuota = '30 MB (31,457,280 bytes)' @@ -308,6 +308,8 @@ if ($exchangeInstalled) -ExpectedGetResults $expectedGetResults } + #importing the required commands + Get-RemoteExchangeSession -Credential $shellCredentials -CommandsToLoad '*-MailboxDatabase' # Clean up the test database Initialize-ExchDscDatabase -Database $TestDBName } From 64d02149aafd4d2047d02d7182acba76a20d0a96 Mon Sep 17 00:00:00 2001 From: Svilen Sultanov Date: Wed, 22 Apr 2020 22:07:26 +0200 Subject: [PATCH 3/4] updated changelog --- CHANGELOG.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e142eeb2..7390926d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,11 +7,6 @@ For older change log history see the [historic changelog](HISTORIC_CHANGELOG.md) ## [Unreleased] -- xExchange - - A remote implicing module with all Exchange cmdlets will be created under - $env:Temp and reused every time DSC check runs, instead of creating a new - module every time. - ### Changed - xExchange @@ -19,6 +14,9 @@ For older change log history see the [historic changelog](HISTORIC_CHANGELOG.md) - Fixing xExchSendConnector ExtendedRight functionality by moving the test function to the helper module and setting explicit Deny permissions, instead of removing the marked as 'Deny' entries. + - A remote implicing module with all Exchange cmdlets will be created under + $env:Temp and reused every time DSC check runs, instead of creating a new + module every time. ## [1.31.0] - 2020-01-27 From 60c26b8d53cedd433f382aeb3f6eb93091f0af79 Mon Sep 17 00:00:00 2001 From: Mike Hendrickson Date: Mon, 27 Apr 2020 15:30:40 -0700 Subject: [PATCH 4/4] Update MSFT_xExchMailboxDatabase.Integration.Tests.ps1 --- .../Integration/MSFT_xExchMailboxDatabase.Integration.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Integration/MSFT_xExchMailboxDatabase.Integration.Tests.ps1 b/tests/Integration/MSFT_xExchMailboxDatabase.Integration.Tests.ps1 index 06fe6428..ec911a33 100644 --- a/tests/Integration/MSFT_xExchMailboxDatabase.Integration.Tests.ps1 +++ b/tests/Integration/MSFT_xExchMailboxDatabase.Integration.Tests.ps1 @@ -308,7 +308,7 @@ if ($exchangeInstalled) -ExpectedGetResults $expectedGetResults } - #importing the required commands + # Importing the required commands Get-RemoteExchangeSession -Credential $shellCredentials -CommandsToLoad '*-MailboxDatabase' # Clean up the test database Initialize-ExchDscDatabase -Database $TestDBName