Hi,
I’m trying to configure the Intune “Autopilot Reset” configuration (Device restrictions configuration) via PowerShell as below and am getting really confused and frustrated. If anyone can help with this I would really appreciate.

The problem is I can’t find the exact configuration. I’m saving and loading from another configuration and it’s not working.
I tried to configure it manually, export and compare it with original and there’s no differences!
Also used Graph Explorer on https://graph.microsoft.com/v1.0/deviceManagement/deviceConfigurations/ doing the same save/change/save/compare but again, no differences.
the code is:
Connect-MgGraph -NoWelcome -Scopes "DeviceManagementConfiguration.ReadWrite.All"
$P2 = @{
"@odata.type" = "#microsoft.graph.windows10GeneralConfiguration"
displayName = "Device restrictions"
description = "Description value"
"resetProtectionModeBlocked" = $false
"edgeDisableFirstRunPage" = $false
"defenderScanMappedNetworkDrivesDuringFullScan" = $false
"bluetoothBlocked" = $false
"edgeCookiePolicy" = "userDefined"
"tenantLockdownRequireNetworkDuringOutOfBoxExperience" = $true
"startMenuPinnedFolderMusic" = "notConfigured"
"startMenuHideRecentlyAddedApps" = $false
"edgeSyncFavoritesWithInternetExplorer" = $false
"edgeBlocked" = $false
"windowsSpotlightBlockConsumerSpecificFeatures" = $false
"settingsBlockNetworkInternetPage" = $false
"startMenuPinnedFolderVideos" = "notConfigured"
"bluetoothBlockDiscoverableMode" = $false
"lockScreenBlockActionCenterNotifications" = $false
"edgeBlockDeveloperTools" = $false
"searchBlockDiacritics" = $false
"startMenuPinnedFolderSettings" = "notConfigured"
"logonBlockFastUserSwitching" = $false
"wirelessDisplayBlockProjectionToThisDevice" = $false
"settingsBlockRemoveProvisioningPackage" = $false
"edgeAllowStartPagesModification" = $false
"searchDisableIndexerBackoff" = $false
"startMenuHideShutDown" = $false
"passwordBlockSimple" = $false
"cameraBlocked" = $false
"startMenuPinnedFolderHomeGroup" = "notConfigured"
"windowsSpotlightConfigureOnLockScreen" = "notConfigured"
"defenderScanArchiveFiles" = $false
"searchEnableRemoteQueries" = $false
"defenderFileExtensionsToExclude" = @(
)
"lockScreenBlockCortana" = $false
"defenderDetectedMalwareActions" = @{
"lowSeverity" = "quarantine"
"moderateSeverity" = "quarantine"
"highSeverity" = "quarantine"
"severeSeverity" = "quarantine"
}
"startMenuPinnedFolderDocuments" = "notConfigured"
"bluetoothBlockPrePairing" = $false
"settingsBlockChangePowerSleep" = $false
"nfcBlocked" = $false
"privacyAutoAcceptPairingAndConsentPrompts" = $false
"copyPasteBlocked" = $false
"defenderScanType" = "userDefined"
"wirelessDisplayBlockUserInputFromReceiver" = $false
"wirelessDisplayRequirePinForPairing" = $false
"edgeHomepageUrls" = @()
"startMenuHideFrequentlyUsedApps" = $false
"defenderRequireCloudProtection" = $true
"edgeBlockAddressBarDropdown" = $false
"cortanaBlocked" = $false
"startMenuHideUserTile" = $false
"searchDisableIndexingRemovableDrive" = $false
"cellularBlockDataWhenRoaming" = $false
"wiFiBlockManualConfiguration" = $false
"wiFiBlockAutomaticConnectHotspots" = $false
"antiTheftModeBlocked" = $false
"settingsBlockSystemPage" = $false
"edgeBlockInPrivateBrowsing" = $false
"edgeSendIntranetTrafficToInternetExplorer" = $false
"appsBlockWindowsStoreOriginatedApps" = $false
"storageRestrictAppDataToSystemVolume" = $false
"voiceRecordingBlocked" = $false
"startMenuHidePowerButton" = $false
"edgeBlockJavaScript" = $false
"edgeBlockSendingDoNotTrackHeader" = $false
"defenderScanScriptsLoadedInInternetExplorer" = $false
"settingsBlockGamingPage" = $false
"defenderBlockEndUserAccess" = $false
"passwordRequireWhenResumeFromIdleState" = $false
"defenderScanDownloads" = $false
"experienceBlockDeviceDiscovery" = $false
"webRtcBlockLocalhostIpAddress" = $false
"passwordRequired" = $false
"defenderScanIncomingMail" = $false
"startMenuPinnedFolderPersonalFolder" = "notConfigured"
"edgeBlockCompatibilityList" = $false
"lockScreenBlockToastNotifications" = $false
"deviceManagementBlockManualUnenroll" = $false
"startMenuHideRestartOptions" = $false
"startMenuAppListVisibility" = "userDefined"
"startMenuHideSleep" = $false
"windowsSpotlightBlockOnActionCenter" = $false
"appsAllowTrustedAppsSideloading" = "notConfigured"
"searchDisableIndexingEncryptedItems" = $false
"settingsBlockUpdateSecurityPage" = $false
"settingsBlockAddProvisioningPackage" = $false
"startMenuHideLock" = $false
"edgeBlockExtensions" = $false
"edgeBlockPasswordManager" = $false
"startMenuHideChangeAccountSettings" = $false
"connectedDevicesServiceBlocked" = $false
"defenderRequireRealTimeMonitoring" = $false
"privacyBlockInputPersonalization" = $false
"startMenuHideHibernate" = $false
"windowsSpotlightBlockWelcomeExperience" = $false
"windowsSpotlightBlockThirdPartyNotifications" = $false
"cellularBlockVpnWhenRoaming" = $false
"defenderRequireBehaviorMonitoring" = $false
"defenderSystemScanSchedule" = "userDefined"
"gameDvrBlocked" = $false
"storageRequireMobileDeviceEncryption" = $false
"usbBlocked" = $false
"settingsBlockTimeLanguagePage" = $false
"startMenuPinnedFolderDownloads" = "notConfigured"
"microsoftAccountBlocked" = $false
"accountsBlockAddingNonMicrosoftAccountEmail" = $false
"defenderMonitorFileActivity" = "userDefined"
"edgeBlockAutofill" = $false
"startMenuPinnedFolderNetwork" = "notConfigured"
"experienceBlockTaskSwitcher" = $false
"bluetoothBlockAdvertising" = $false
"settingsBlockChangeRegion" = $false
"defenderScanRemovableDrivesDuringFullScan" = $false
"defenderPromptForSampleSubmission" = "promptBeforeSendingPersonalData"
"edgeClearBrowsingDataOnExit" = $false
"smartScreenEnableAppInstallControl" = $false
"deviceManagementBlockFactoryResetOnMobile" = $false
"oneDriveDisableFileSync" = $false
"searchEnableAutomaticIndexSizeManangement" = $false
"storageBlockRemovableStorage" = $false
"privacyAdvertisingId" = "notConfigured"
"windowsSpotlightBlockTailoredExperiences" = $false
"experienceBlockErrorDialogWhenNoSIM" = $false
"startMenuHideSwitchAccount" = $false
"internetSharingBlocked" = $false
"startMenuMode" = "userDefined"
"defenderFilesAndFoldersToExclude" = @()
"edgeRequireSmartScreen" = $false
"developerUnlockSetting" = "notConfigured"
"settingsBlockEditDeviceName" = $false
"passwordRequiredType" = "deviceDefault"
"edgeBlockPopups" = $false
"startBlockUnpinningAppsFromTaskbar" = $false
"bluetoothAllowedServices" = @()
"settingsBlockChangeLanguage" = $false
"settingsBlockAccountsPage" = $false
"smartScreenBlockPromptOverride" = $false
"networkProxyDisableAutoDetect" = $false
"edgeBlockSendingIntranetTrafficToInternetExplorer" = $false
"startMenuHideRecentJumpLists" = $false
"settingsBlockAppsPage" = $false
"defenderRequireNetworkInspectionSystem" = $false
"sharedUserAppDataAllowed" = $false
"settingsBlockPersonalizationPage" = $false
"safeSearchFilter" = "userDefined"
"startMenuPinnedFolderPictures" = "notConfigured"
"windowsSpotlightBlockWindowsTips" = $false
"diagnosticsDataSubmissionMode" = "none"
"windowsStoreBlocked" = $false
"windowsSpotlightBlocked" = $false
"defenderCloudBlockLevel" = "notConfigured"
"screenCaptureBlocked" = $false
"settingsBlockChangeSystemTime" = $false
"edgeBlockLiveTileDataCollection" = $false
"windowsStoreEnablePrivateStoreOnly" = $false
"settingsBlockPrivacyPage" = $false
"settingsBlockDevicesPage" = $false
"edgeBlockSearchSuggestions" = $false
"startMenuPinnedFolderFileExplorer" = "notConfigured"
"certificatesBlockManualRootCertificateInstallation" = $false
"locationServicesBlocked" = $false
"edgeBlockAccessToAboutFlags" = $false
"startMenuHideSignOut" = $false
"settingsBlockSettingsApp" = $false
"networkProxyApplySettingsDeviceWide" = $false
"windowsStoreBlockAutoUpdate" = $false
"microsoftAccountBlockSettingsSync" = $false
"settingsBlockEaseOfAccessPage" = $false
"wiFiBlocked" = $false
"lockScreenAllowTimeoutConfiguration" = $false
"searchDisableAutoLanguageDetection" = $false
"cellularBlockVpn" = $false
"storageRestrictAppInstallToSystemVolume" = $false
"defenderScanNetworkFiles" = $false
"defenderProcessesToExclude" = @()
"smartScreenBlockPromptOverrideForFiles" = $false
}
$newProfileId = New-MgDeviceManagementDeviceConfiguration -BodyParameter $p2
The above code works but the result is below. it does not create the “Autopilot Reset” and creates the “Cellular data channel” which I also don’t know which configuration comes from.
Again, from the below, I copy the config from graph explorer, change the configuration to fix the cellular data and enable autopilot reset and then compare with graph explorer and the only changes are the last date and version.
I suspected it could be resetProtectionModeBlocked tested with true and false and I can see the differences in graph explorer but it doesn’t show any different in the Intune portal.
The overall behaviour seems very weird but it’s possible I’m doing something wrong.
If someone could shed some light would be amazing.
Cheers,
C



