diff --git a/CHANGELOG.md b/CHANGELOG.md index c45cd1400e..7261161f8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,11 @@ * SPOTenantCdnPolicy * If properties in the tenant are empty then export them as empty arrays instead of null strings, missed while fixing #4658 +* M365DSCUtil + * Fixed an issue in `Assert-M365DSCBlueprint` where the clone and export + of a blueprint with a GUID could lead to configuration name starting + with a digit instead of a letter. + Partially fixes [#4681](https://github.com/microsoft/Microsoft365DSC/issues/4681) # 1.24.515.2 diff --git a/Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1 b/Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1 index 775b1e711c..c87282c1d5 100644 --- a/Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1 +++ b/Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1 @@ -2720,7 +2720,7 @@ function Assert-M365DSCBlueprint Add-M365DSCTelemetryEvent -Data $data #endregion - $TempBluePrintName = (New-Guid).ToString() + '.M365' + $TempBluePrintName = 'TempBlueprint_' + (New-Guid).ToString() + '.M365' $LocalBluePrintPath = Join-Path -Path $env:Temp -ChildPath $TempBluePrintName try { @@ -2793,7 +2793,7 @@ function Assert-M365DSCBlueprint # Call the Export-M365DSCConfiguration cmdlet to extract only the resource # types contained within the BluePrint; Write-Host "Initiating the Export of those ($($ResourcesInBluePrint.Length)) components from the tenant..." - $TempExportName = (New-Guid).ToString() + '.ps1' + $TempExportName = 'TempExport_' + (New-Guid).ToString() + '.ps1' Export-M365DSCConfiguration -Components $ResourcesInBluePrint ` -Path $env:temp ` -FileName $TempExportName `