Skip to content

Commit

Permalink
Merge pull request #3616 from NikCharlebois/Fix-#3610
Browse files Browse the repository at this point in the history
Fixes #3610
  • Loading branch information
NikCharlebois authored Aug 29, 2023
2 parents 9df3db3 + 861a483 commit 61260b5
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 21 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Change log for Microsoft365DSC

# UNRELEASED

* DEPENDENCIES
* Updated Microsoft.Graph to version 2.4.0.
* Updated ReverseDSC to version 2.0.0.18
* MISC
* Fixes an issue with the generic export CIM Instance logic.
FIXES [#3610](https://github.com/microsoft/Microsoft365DSC/issues/3610)

# 1.23.823.1

* AADAuthorizationPolicy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1074,8 +1074,8 @@ function Export-TargetResource
}
if ($null -ne $Results.Members)
{
$currentDSCBlock = $currentDSCBlock.Replace("`",`"`r`n", "")
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'Members' -IsCIMArray $true
$currentDSCBlock = $currentDSCBlock.Replace("`",`"`r`n", "")
$currentDSCBlock = $currentDSCBlock.Replace(",`r`n", '').Replace("`");`r`n", ");`r`n")
$currentDSCBlock = $currentDSCBlock.Replace("Members = @(`"", "Members = @(")
$currentDSCBlock = $currentDSCBlock.Replace("`$OrganizationName'", "' + `$OrganizationName")
Expand Down
34 changes: 17 additions & 17 deletions Modules/Microsoft365DSC/Dependencies/Manifest.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -10,67 +10,67 @@
},
@{
ModuleName = 'Microsoft.Graph.Applications'
RequiredVersion = '2.3.0'
RequiredVersion = '2.4.0'
},
@{
ModuleName = 'Microsoft.Graph.Authentication'
RequiredVersion = '2.3.0'
RequiredVersion = '2.4.0'
},
@{
ModuleName = 'Microsoft.Graph.Beta.DeviceManagement'
RequiredVersion = '2.3.0'
RequiredVersion = '2.4.0'
},
@{
ModuleName = 'Microsoft.Graph.Beta.Devices.CorporateManagement'
RequiredVersion = '2.3.0'
RequiredVersion = '2.4.0'
},
@{
ModuleName = 'Microsoft.Graph.Beta.DeviceManagement.Administration'
RequiredVersion = '2.3.0'
RequiredVersion = '2.4.0'
},
@{
ModuleName = 'Microsoft.Graph.Beta.DeviceManagement.Enrollment'
RequiredVersion = '2.3.0'
RequiredVersion = '2.4.0'
},
@{
ModuleName = 'Microsoft.Graph.Beta.Identity.DirectoryManagement'
RequiredVersion = '2.3.0'
RequiredVersion = '2.4.0'
},
@{
ModuleName = 'Microsoft.Graph.Beta.Identity.Governance'
RequiredVersion = '2.3.0'
RequiredVersion = '2.4.0'
},
@{
ModuleName = 'Microsoft.Graph.Beta.Identity.SignIns'
RequiredVersion = '2.3.0'
RequiredVersion = '2.4.0'
},
@{
ModuleName = 'Microsoft.Graph.Beta.Teams'
RequiredVersion = '2.3.0'
RequiredVersion = '2.4.0'
},
@{
ModuleName = 'Microsoft.Graph.DeviceManagement.Administration'
RequiredVersion = '2.3.0'
RequiredVersion = '2.4.0'
},
@{
ModuleName = 'Microsoft.Graph.Beta.DirectoryObjects'
RequiredVersion = '2.3.0'
RequiredVersion = '2.4.0'
},
@{
ModuleName = 'Microsoft.Graph.Groups'
RequiredVersion = '2.3.0'
RequiredVersion = '2.4.0'
},
@{
ModuleName = 'Microsoft.Graph.Planner'
RequiredVersion = '2.3.0'
RequiredVersion = '2.4.0'
},
@{
ModuleName = 'Microsoft.Graph.Users'
RequiredVersion = '2.3.0'
RequiredVersion = '2.4.0'
},
@{
ModuleName = 'Microsoft.Graph.Users.Actions'
RequiredVersion = '2.3.0'
RequiredVersion = '2.4.0'
},
@{
ModuleName = 'Microsoft.PowerApps.Administration.PowerShell'
Expand All @@ -90,7 +90,7 @@
},
@{
ModuleName = 'ReverseDSC'
RequiredVersion = '2.0.0.16'
RequiredVersion = '2.0.0.18'
}
)
}
6 changes: 3 additions & 3 deletions Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -427,15 +427,15 @@ function Get-M365DSCDRGComplexTypeToString
$currentProperty += "$indent}"
#if ($isArray -or $IndentLevel -gt 4)
#{
$currentProperty += "`r`n"
#$currentProperty += "`r`n"
#}

#Indenting last parenthese when the cim instance is an array
if ($IndentLevel -eq 5)
<#if ($IndentLevel -eq 5)
{
$indent = ' ' * ($IndentLevel -2)
$currentProperty += $indent
}
}#>

$emptyCIM = $currentProperty.replace(' ', '').replace("`r`n", '')
if ($emptyCIM -eq "MSFT_$CIMInstanceName{}")
Expand Down

0 comments on commit 61260b5

Please sign in to comment.