Skip to content

Commit 82b2d3a

Browse files
Aaron KenahAaron Kenah
authored andcommitted
Update SettingInstance odataType property to pull from AdditionalProperties object instead of the main object.
1 parent edd14cc commit 82b2d3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/Microsoft365DSC/DSCResources/MSFT_IntuneSettingCatalogCustomPolicyWindows10/MSFT_IntuneSettingCatalogCustomPolicyWindows10.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ function Get-TargetResource
143143
foreach ($currentSettings in $getValue.settings)
144144
{
145145
$complexSettingInstance = [hashtable]@{}
146-
if ( -Not([string]::IsNullOrEmpty($currentSettings.SettingInstance.'@odata.type')) )
146+
if ( -Not([string]::IsNullOrEmpty($currentSettings.SettingInstance.AdditionalProperties.'@odata.type')) )
147147
{
148-
$complexSettingInstance['odataType'] = $currentSettings.SettingInstance.'@odata.type'
148+
$complexSettingInstance['odataType'] = $currentSettings.SettingInstance.AdditionalProperties.'@odata.type'
149149
}
150150
if ( -Not([string]::IsNullOrEmpty($currentSettings.SettingInstance.settingDefinitionId)) )
151151
{

0 commit comments

Comments
 (0)