Skip to content

Conversation

@FabienTschanz
Copy link
Collaborator

@FabienTschanz FabienTschanz commented Jan 29, 2026

Pull Request (PR) description

This PR fixes an issue on Azure DevOps & GitHub Pipelines where an export would stop if a resource threw an error. All subsequent resources won't be processed and the execution is aborted. This is because the default $ErrorActionPreference is set to Stop on these pipelines.

The behavior of Export-M365DSCConfiguration was updated to set the preference to Continue if it was not specified with the -ErrorAction parameter.

Additionally, it expands the try/catch in the Get-TargetResource function for two resources.

This Pull Request (PR) fixes the following issues

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 fix/export-erroraction branch from b546e0b to 7d9ae2d Compare January 29, 2026 11:47
@FabienTschanz FabienTschanz changed the title Fix stopping export from error on DevOps Fix stopping export from error on DevOps & Try/Catch Expanded Jan 30, 2026
@NikCharlebois NikCharlebois merged commit 054f6ce into microsoft:Dev Feb 11, 2026
3 checks passed
@FabienTschanz FabienTschanz deleted the fix/export-erroraction branch February 11, 2026 19:40
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.

Cannot use M365DSC anymore O365SearchAndIntelligenceConfigurations: False Drift Detection

2 participants