Skip to content

Commit

Permalink
Merge pull request #4698 from FabienTschanz/fix/enrollment-restrictio…
Browse files Browse the repository at this point in the history
…ns-default-missing

Fix missing default policy export of enrollment platform restriction
  • Loading branch information
NikCharlebois authored May 22, 2024
2 parents 33cb392 + 54d2797 commit 42ccb25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
* IntuneDeviceConfigurationPlatformScriptMacOS
* Initial Release
FIXES [#4157](https://github.com/microsoft/Microsoft365DSC/issues/4157)
* IntuneDeviceEnrollmentPlatformRestriction
* Fix missing export of the default policy
FIXES [#4694](https://github.com/microsoft/Microsoft365DSC/issues/4694)
* IntuneDeviceEnrollmentStatusPageWindows10
* Return all authentication methods when retrieving the policies otherwise
it may fail deducing the OrganizationName via TenantId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ function Export-TargetResource
try
{
[array]$configs = Get-MgBetaDeviceManagementDeviceEnrollmentConfiguration -Filter $Filter -All `
-ErrorAction Stop | Where-Object -FilterScript { $_.DeviceEnrollmentConfigurationType -eq 'singlePlatformRestriction' }
-ErrorAction Stop | Where-Object -FilterScript { $_.DeviceEnrollmentConfigurationType -like '*platformRestriction*' }

$i = 1
$dscContent = ''
Expand Down Expand Up @@ -792,6 +792,7 @@ function Export-TargetResource
$Results.Remove('WindowsHomeSkuRestriction') | Out-Null
}
}

if ($null -ne $Results.WindowsMobileRestriction)
{
$complexTypeStringResult = Get-M365DSCDRGComplexTypeToString -ComplexObject ($Results.WindowsMobileRestriction) -CIMInstanceName DeviceEnrollmentPlatformRestriction
Expand Down

0 comments on commit 42ccb25

Please sign in to comment.