Skip to main content

Set-IntuneAutoMDMEnrollmentPolicy

SYNOPSIS

Configures the MDM enrollment policy for Microsoft Entra ID.

SYNTAX

DESCRIPTION

This function enables or disables automatic MDM enrollment during device registration in Microsoft Entra ID.

EXAMPLES

EXAMPLE 1

Disables automatic MDM enrollment during device registration.

EXAMPLE 2

Enables automatic MDM enrollment during device registration.

PARAMETERS

-Confirm

Prompts you for confirmation before running the cmdlet.

-State

Specifies whether MDM enrollment should be enabled or disabled during registration.
  • ‘Enabled’ : Enables automatic MDM enrollment (sets isMdmEnrollmentDuringRegistrationDisabled to false)
  • ‘Disabled’ : Disables automatic MDM enrollment (sets isMdmEnrollmentDuringRegistrationDisabled to true)

-WhatIf

Runs the command in a mode that only reports what would happen without performing the actions.

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

Requires the following Microsoft Graph permissions:
  • Policy.ReadWrite.MobilityManagement
Connect-MgGraph -Scopes ‘Policy.ReadWrite.MobilityManagement’