microsoft / Microsoft365DSC

Manages, configures, extracts and monitors Microsoft 365 tenant configurations
https://aka.ms/M365DSC
MIT License
1.45k stars 440 forks source link

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

Open commandcom opened 2 months ago

commandcom commented 2 months ago

Description of the issue

bxu5juke

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
andikrueger commented 1 month ago

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

commandcom commented 1 month ago

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
andikrueger commented 1 month ago

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

commandcom commented 1 month ago

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