Microsoft365DSC icon indicating copy to clipboard operation
Microsoft365DSC copied to clipboard

EXOAcceptedDomains: Test-DscConfiguration throws error on processing large number of EXOAcceptedDomains

Open commandcom opened this issue 9 months ago • 4 comments

Description of the issue

  • We have a large number of AcceptedDomains to process (474)
  • If all 474 resources are in the datafile, DSC will fail while running Test-DscConfiguration against the MOF
  • If the number of AcceptedDomains are split in half and processed separately, DSC does not fail
  • DSC fails with:

bxu5juke

  • We have run into this MaxEnvelopeSize issue before

    • Resolution for this problem specifies increasing the envelope size through a registry entry or a PowerShell command
  • The value is currently set to 9999

  • Increased this value to 50000

  • Reboot

  • Same issue

  • Not sure where to proceed from here

  • Cannot find any useful information about MaxEnvelopeSize

    • e.g. is 50K a valid value?
  • Any insight is appreciated

Microsoft 365 DSC Version

1.24.424.1

Which workloads are affected

Exchange Online

The DSC configuration

No response

Verbose logs showing the problem

No response

Environment Information + PowerShell Version

OsName               : Microsoft Windows Server 2019 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture       : 64-bit
WindowsVersion       : 1809
WindowsBuildLabEx    : 17763.1.amd64fre.rs5_release.180914-1434
OsLanguage           : en-US
OsMuiLanguages       : {en-US}4

Name                           Value
----                           -----
PSVersion                      5.1.17763.5696
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17763.5696
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

commandcom avatar May 03 '24 14:05 commandcom

There is more information about the Max envelope size available: https://learn.microsoft.com/en-us/windows/win32/winrm/installation-and-configuration-for-windows-remote-management?redirectedfrom=MSDN#maxenvelopesizekb

please review you4 settings and please share the file size of your .mof file

andikrueger avatar May 06 '24 20:05 andikrueger

Thanks for clearing up my confusion on the max envelope size.

Additional analysis found an entry in the event log that corresponds to the pipeline error:

Log Name:      M365DSC
Source:        MSFT_EXOAcceptedDomain
Date:          5/6/2024 9:08:29 PM
Event ID:      1
Task Category: (1)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      xxxyyyzzz
Description:
Error retrieving data:

{ Exception of type 'System.OutOfMemoryException' was thrown. } \ at Log-Column, C:\Windows\TEMP\tmpEXO_l0f0q2dv.s2p\tmpEXO_l0f0q2dv.s2p.psm1: line 114 \ at Init-CmdletBegin<Process>, C:\Windows\TEMP\tmpEXO_l0f0q2dv.s2p\tmpEXO_l0f0q2dv.s2p.psm1: line 2048 \ at script:Get-AcceptedDomain<Begin>, C:\Windows\TEMP\tmpEXO_l0f0q2dv.s2p\tmpEXO_l0f0q2dv.s2p.psm1: line 2521 \ at Get-TargetResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.424.1\DscResources\MSFT_EXOAcceptedDomain\MSFT_EXOAcceptedDomain.psm1: line 96 \ at Test-TargetResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.424.1\DscResources\MSFT_EXOAcceptedDomain\MSFT_EXOAcceptedDomain.psm1: line 311
  • MOF file size was 666 KB
  • VM the script is running on has only 8GB of memory
  • Plan is to double that
  • Takes several days for the resize request to get through the internal security audit
  • Will post results here

commandcom avatar May 07 '24 13:05 commandcom

Were you able to get some more RAM for your VM?

andikrueger avatar May 30 '24 21:05 andikrueger

We are still waiting. Two more signatures to go. Had no idea it would take this long to get approval.

commandcom avatar May 30 '24 23:05 commandcom