Skip to content
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

EXODistributionGroup not properly escaping single quotes in name. #3044

Closed
levesquesamuel opened this issue Mar 20, 2023 · 0 comments · Fixed by #3045 or #3061
Closed

EXODistributionGroup not properly escaping single quotes in name. #3044

levesquesamuel opened this issue Mar 20, 2023 · 0 comments · Fixed by #3045 or #3061
Labels
Bug Something isn't working Exchange Online

Comments

@levesquesamuel
Copy link
Contributor

Details of the scenario you tried and the problem that is occurring

When exporting EXODistributionGroup if it contains a single quote in it then it will cause an error.

Verbose logs showing the problem

N/A (error)

Suggested solution to the issue

Escape with double quotes :

$distributionGroup = Get-DistributionGroup -Filter "Name -eq ""$Name""" -ErrorAction Stop

The DSC configuration that is used to reproduce the issue (as detailed as possible)

$New-DistributionGroup -name "SingleQuote'DistributionGroup"


$distributionGroup = Get-DistributionGroup -Filter "Name -eq '$Name'" -ErrorAction Stop

 Export-M365DSCConfiguration -CertificateThumbprint X -ApplicationId X -TenantId X -Mode Full -Components @("EXODistributionGroup")

The operating system the target node is running

Version of the DSC module that was used ('dev' if using current dev branch)

OsName : Microsoft Windows 11 Enterprise
OsOperatingSystemSKU : EnterpriseEdition
OsArchitecture : 64-bit
WindowsVersion : 2009
WindowsBuildLabEx : 22621.1.amd64fre.ni_release.220506-1250
OsLanguage : en-US
OsMuiLanguages : {en-US, en-GB}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Exchange Online
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants