Viktor Ohlsson
Viktor Ohlsson

Reputation: 1

Getting certificate details of an Intune managed device via Device ID

I'm new to Intune and a N00B at PowerShell.. Currently trying to get the Certificate info of a device managed by Intune by using the device ID. Relevent documentation has been hard to find..

My question is, how do I display info about a Device certificate and see info such as SubjectName, OrderNumber and more using PowerShell with a deviceID?

Steps taken so far:

  1. Connected with "Connect-MgGraph" successfully
  2. Get-MgDevice -DeviceId 'xxxxxxxxx' successfully
  3. ???

SCEP profile is setup and works as intended towards the PKI.The devices are getting certs and are able to connect to 802.1x

Upvotes: 0

Views: 1534

Answers (1)

Jahnavi
Jahnavi

Reputation: 8008

Install and import Microsoft.Graph.Intune module using below commands:

Install-Module -Name Microsoft.Graph.Intune
Import-Module -Name Microsoft.Graph.Intune  

Try executing the below script to get the intune managed devices certificate information as shown:

connect-Mggraph
$device = Get-IntuneManagedDevice -deviceId "<DeviceID>"
$certificates = Get-IntuneManagedDeviceCertificate -DeviceId $device | select thumbprint, device //Select for the required fields

Connected successfully:

enter image description here

Search for Intune in Azure Portal and it will redirect you to below page.

enter image description here

Check for the commands in Microsoft Intune using below command:

Get-Command -Module Microsoft.Graph.Intune

enter image description here

Reference

Upvotes: 0

Related Questions