Microsoft365DSC icon indicating copy to clipboard operation
Microsoft365DSC copied to clipboard

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

Open Harshit057 opened this issue 1 year ago • 4 comments

…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).

Harshit057 avatar Apr 12 '25 20:04 Harshit057

I accept to all the terms and policies

Harshit057 avatar Apr 13 '25 05:04 Harshit057

@microsoft-github-policy-service agree

Harshit057 avatar Apr 13 '25 06:04 Harshit057

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.

ykuijs avatar Apr 15 '25 13:04 ykuijs

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

Harshit057 avatar Apr 15 '25 18:04 Harshit057

@Harshit057 Please add the changelog entry. Thank you.

FabienTschanz avatar Jun 25 '25 21:06 FabienTschanz

hii, can someone lead me to how I should number my changelog entry

Harshit057 avatar Jul 22 '25 17:07 Harshit057

@Harshit057 Just add a # UNRELEASED section at the top. See some of my PRs as an example.

FabienTschanz avatar Aug 09 '25 11:08 FabienTschanz

Done with the changelog entry

Harshit057 avatar Aug 24 '25 05:08 Harshit057