Fix null string conversion in Export-M365DSCConfiguration for EXOMailboxAutoReplyConfiguration#5998
…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
- Fixes #5998
Task list
- [x] 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.
- [x] New/changed code adheres to [DSC Community Style Guidelines](https://dsccommunity.org/styleguidelines).
I accept to all the terms and policies
@microsoft-github-policy-service agree
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.
ok @ykuijs , i will be correcting the work Thankyou for the review
@Harshit057 Please add the changelog entry. Thank you.
hii, can someone lead me to how I should number my changelog entry
@Harshit057 Just add a # UNRELEASED section at the top. See some of my PRs as an example.
Done with the changelog entry