Skip to content

Conversation

@FabienTschanz
Copy link
Collaborator

@FabienTschanz FabienTschanz commented Jan 15, 2026

Pull Request (PR) description

This PR introduces a core C# engine for vastly improved performance during configuration testing, especially large numbers of configurations benefit from this change. Combined with improvements to the DSCParser in microsoft/DSCParser#71, this leads to a performance increase of up to 10x faster in certain scenarios.

One example from my own lab: Previously, the comparison of my tenant configuration took ~11 minutes, which was brought down to just ~30-35 seconds with all improvements. Tests were conducted on a Standard D2ads v5 machine with 2 CPU cores and 8GB of RAM. No fancy hardware, just a standard Azure virtual machine in a Managed DevOps Pool.

Please be aware of the fact that this heavily depends on the size of the configuration. The bigger the configuration, the greater the time consumed. The configuration size varied between 1.5MB (AAD) at most to 2KB as the lowest size. The middle sizes were ~700KB (EXO, INTUNE) and 500KB (SC).

Before (with 1.26.114.1):
image

After:
image

Please note: The DSCParser PR mentioned above is a prerequisite for this one because it improves caching of DSC resources for report generation.

Following the full release notes for this PR. It also contains a lot of fixes around types and values being passed to other functions.

  • AADConditionalAccessPolicy
    • Fixed an issue where arrays could contain empty strings.
  • AADPasswordRuleSettings
    • Fixed an issue where BannedPasswordList could be null.
  • AADPIMGroupSetting
    • Fixed an issue where typed variables could lead to an exception.
  • EXOIRMConfiguration
    • Changed the parameters LicensingLocation and RMSOnlineKeySharingLocation
      to System.String instead of an implicit conversion to System.Uri.
  • EXOMigration
    • Fixed an issue where UserEmails could contain empty strings.
  • IntuneDeviceEnrollmentStatusPageWindows10
    • Fixed an issue where SelectedMobileAppNames could contain empty strings
      during the execution of Test-TargetResoure.
  • SCPolicyConfig
    • Fixed an issue where the sub-property JustificationText could contain
      empty strings.
  • M365DSCTelemetryEngine
    • Added a function to test if telemetry is enabled.
  • MISC
    • Added more performance improvements for hot code paths.
    • Fixed issues with mismatched property types in resource tests.
    • Refactored parts of the core engine with C#.
    • Replaced Get-(Pwsh)DscResource with a custom implementation.
  • DEPENDENCIES
    • Removed the dependency on PSDesiredStateConfiguration.

This Pull Request (PR) fixes the following issues

None.

Task list

  • Added an entry to the change log under the Unreleased section of the file CHANGELOG.md.
    Entry should say what was changed and how that affects users (if applicable), and
    reference the issue being resolved (if applicable).
  • Resource parameter descriptions added/updated in the schema.mof.
  • Resource documentation added/updated in README.md.
  • Resource settings.json file contains all required permissions.
  • Examples appropriately added/updated.
  • Unit tests added/updated.
  • New/changed code adheres to DSC Community Style Guidelines.

@FabienTschanz FabienTschanz force-pushed the feat/c-sharp-core-engine branch from 70b6000 to 5ff157f Compare January 16, 2026 08:25
@FabienTschanz FabienTschanz force-pushed the feat/c-sharp-core-engine branch from 5ff157f to afd8170 Compare January 17, 2026 01:17
@FabienTschanz
Copy link
Collaborator Author

FabienTschanz commented Jan 18, 2026

Waiting on the merge of the new DSCParser version.

@FabienTschanz FabienTschanz force-pushed the feat/c-sharp-core-engine branch from 3dbc8f4 to 84eb110 Compare January 20, 2026 14:29

# Verify .NET SDK is available
try {
$dotnetVersion = dotnet --version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FabienTschanz You should apply the same fix here as you applied on DSCParser

@FabienTschanz FabienTschanz force-pushed the feat/c-sharp-core-engine branch from a93485a to 3d552b4 Compare February 10, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants