Skip to content

Commit

Permalink
Merge pull request #4692 from FabienTschanz/fix/assert-m365dscblueprint
Browse files Browse the repository at this point in the history
Fix blueprint export configuration name
  • Loading branch information
NikCharlebois committed May 22, 2024
2 parents cfe90aa + 19e8ad5 commit 381a3f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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 `
Expand Down

0 comments on commit 381a3f3

Please sign in to comment.