Skip to main content

SYNOPSIS

Retrieves the current MDM enrollment policy for Microsoft Entra ID.

SYNTAX

DESCRIPTION

This function retrieves the current state of automatic MDM enrollment during device registration in Microsoft Entra ID.

EXAMPLES

EXAMPLE 1

Retrieves the current MDM enrollment policy state (Enabled/Disabled).

EXAMPLE 2

Retrieves the complete policy object from Microsoft Graph.

PARAMETERS

-AsObject

When specified, returns the complete policy object instead of just the state.

CommonParameters

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

INPUTS

OUTPUTS

String - Returns ‘Enabled’ or ‘Disabled’ by default

PSObject - Returns full policy object when -AsObject is used

NOTES

Requires the following Microsoft Graph permissions:
  • Policy.Read.All
Connect-MgGraph -Scopes ‘Policy.Read.All’ https://ps365.clidsys.com/docs/commands/Get-IntuneAutoMDMEnrollmentPolicy