Examples/Resources/IntuneDeviceEnrollmentPlatformRestriction/2-Update.ps1
<#
This example creates a new Device Enrollment Platform Restriction. #> Configuration Example { param( [Parameter()] [System.String] $ApplicationId, [Parameter()] [System.String] $TenantId, [Parameter()] [System.String] $CertificateThumbprint ) Import-DscResource -ModuleName Microsoft365DSC node localhost { IntuneDeviceEnrollmentPlatformRestriction 'DeviceEnrollmentPlatformRestriction' { AndroidForWorkRestriction = MSFT_DeviceEnrollmentPlatformRestriction{ platformBlocked = $False personalDeviceEnrollmentBlocked = $False }; AndroidRestriction = MSFT_DeviceEnrollmentPlatformRestriction{ platformBlocked = $False personalDeviceEnrollmentBlocked = $False }; Assignments = @( MSFT_DeviceManagementConfigurationPolicyAssignments{ deviceAndAppManagementAssignmentFilterType = 'none' dataType = '#microsoft.graph.allDevicesAssignmentTarget' }); Description = "This is the default Device Type Restriction applied with the lowest priority to all users regardless of group membership."; DeviceEnrollmentConfigurationType = "platformRestrictions"; DisplayName = "All users and all devices"; Identity = "3868d43e-873e-4416-8fd1-fc3d67c7c15c_DefaultPlatformRestrictions"; Ensure = "Present"; IosRestriction = MSFT_DeviceEnrollmentPlatformRestriction{ platformBlocked = $True # Updated Property personalDeviceEnrollmentBlocked = $False }; MacOSRestriction = MSFT_DeviceEnrollmentPlatformRestriction{ platformBlocked = $False personalDeviceEnrollmentBlocked = $False }; MacRestriction = MSFT_DeviceEnrollmentPlatformRestriction{ platformBlocked = $False personalDeviceEnrollmentBlocked = $False }; WindowsHomeSkuRestriction = MSFT_DeviceEnrollmentPlatformRestriction{ platformBlocked = $False personalDeviceEnrollmentBlocked = $False }; WindowsMobileRestriction = MSFT_DeviceEnrollmentPlatformRestriction{ platformBlocked = $True personalDeviceEnrollmentBlocked = $False }; WindowsRestriction = MSFT_DeviceEnrollmentPlatformRestriction{ platformBlocked = $False personalDeviceEnrollmentBlocked = $False }; ApplicationId = $ApplicationId; TenantId = $TenantId; CertificateThumbprint = $CertificateThumbprint; } } } |