Skip to content

Fix null string conversion in Export-M365DSCConfiguration for EXOMailboxAutoReplyConfiguration#5998 #6012

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: Dev
Choose a base branch
from

Conversation

Harshit057
Copy link

@Harshit057 Harshit057 commented Apr 12, 2025

…ation export

Pull Request (PR) description

This PR addresses an issue with the Export-M365DSCConfiguration cmdlet when exporting EXOMailboxAutoReplyConfiguration. For some users, the export process was failing due to an invalid string conversion on one or more mailbox properties that can be $null or not directly convertible to a string.

The fix includes safely handling property values by explicitly casting them with null checks or string interpolation. This prevents runtime exceptions and ensures successful exports for all users.

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](https://dsccommunity.org/styleguidelines).

@Harshit057
Copy link
Author

I accept to all the terms and policies

@Harshit057 Harshit057 reopened this Apr 13, 2025
@Harshit057 Harshit057 changed the title Fix null string conversion in Export-M365DSCConfiguration for EXOMailboxAutoReplyConfiguration Fix null string conversion in Export-M365DSCConfiguration for EXOMailboxAutoReplyConfiguration#5998 Apr 13, 2025
@Harshit057
Copy link
Author

Harshit057 commented Apr 13, 2025

@microsoft-github-policy-service agree

@ykuijs
Copy link
Member

ykuijs commented Apr 15, 2025

Hi @Harshit057, thanks for submitting this PR. Please make sure you also add an entry to the changelog which describes your changes and (when applicable) the link to a GitHub issue. Check out the changelog for examples.

@Harshit057
Copy link
Author

ok @ykuijs , i will be correcting the work
Thankyou for the review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EXOMailboxAutoReplyConfiguration: Export fails on certain users
3 participants