The term 'Get-MgDeviceManagementManagedDeviceEncryptionState' is not recognized

Joni Ljungqvist 61 Reputation points
2023-01-30T15:38:40.8333333+00:00

Hi,

I'm trying to pull information on devices encryption state using the Powershell SDK and Get-MgDeviceManagementManagedDeviceEncryptionState. However, using it (after doing both Install-Module Microsoft.Graph.DeviceManagement and Import-Module Microsoft.Graph.DeviceManagement) yields the following result:

Get-MgDeviceManagementManagedDeviceEncryptionState : The term 'Get-MgDeviceManagementManagedDeviceEncryptionState' is not recognized as the name of a cmdlet, function, script file, or operable program.

What am I missing? I'm unable to find another way to retrieve this information.

Connect-MgGraph and Get-MgDevice both work fine, and it seems that this cmdlet should exist according to https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.devicemanagement/get-mgdevicemanagementmanageddeviceencryptionstate?view=graph-powershell-beta

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,582 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 95,181 Reputation points MVP
    2023-01-30T15:44:32.3933333+00:00

    Try switching to the beta version first, as the cmdlet is only available therein:

    Select-MgProfile beta

    Get-MgDeviceManagementManagedDeviceEncryptionState

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful