Skip to content

Commit

Permalink
LargeIcon compiles but Start-dscconfiguration throws error "request s…
Browse files Browse the repository at this point in the history
…ize exceeded the configured MaxEnvelopeSize quota"
  • Loading branch information
Kajalp1079 committed Oct 5, 2024
1 parent 93a4ce3 commit 4247a60
Showing 1 changed file with 9 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -731,22 +731,13 @@ function Export-TargetResource
}

#LargeIcon
if($null -eq $Results.LargeIcon)
if($Results.LargeIcon)
{
$Results.LargeIcon = $null
$Results.LargeIcon = Get-M365DSCIntuneAppLargeIconAsString -LargeIcon $Results.LargeIcon
}
else
{
#$tempicon = Get-M365DSCDRGComplexTypeToString -ComplexObject $Results.LargeIcon -CIMInstanceName DeviceManagementMimeContent -IsArray $false

if ($tempicon)
{
$Results.LargeIcon = Get-M365DSCIntuneAppLargeIconAsString -LargeIcon $Results.LargeIcon
}
else
{
$Results.Remove('LargeIcon') | Out-Null
}
$Results.Remove('LargeIcon') | Out-Null
}

#endregion complex types
Expand All @@ -767,6 +758,11 @@ function Export-TargetResource
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'Categories'
}

if ($null -ne $Results.LargeIcon)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'LargeIcon'
}

if ($Results.Assignments)
{
$isCIMArray = $false
Expand Down Expand Up @@ -898,7 +894,7 @@ function ConvertTo-M365DSCIntuneAppLargeIcon #set

$result = @{
type = $LargeIcon.Type
value = $iconValue
value = $LargeIcon.Value
}

return $result
Expand Down

0 comments on commit 4247a60

Please sign in to comment.