Blog Post

Endpoint Manager: Find machines not in Autopilot

D Walsham • Jul 02, 2021

Find the amount referred to in your Endpoint Analytics Baseline

Introduction

When it comes to managing your endpoints in endpoint manager, one of the things you may be looking to do is to get all of your Intune registered machines to also be enrolled as Autopilot devices.

Now we can of course just have the deployment profile deployed to all machines and then hit the "Convert targeted machines to autopilot" but this might not necessarily be feasible for every client. We may want to perform some due diligence first so we can at least understand what devices in Intune are not in Autopilot.

Baseline In Endpoint Analytics

When you go into Reports - Endpoint Analytics you should see the overview of our whole estate with the Endpoint Analytics score. But if you also see on the far right where the baseline toggles are is the Insights and recommendations which indicates how many by percentage are not registered with Autopilot.

Whilst this is good information to know, there isn't a direct way of seeing exactly which machines are actually not registered, and this is where we come in.

How to Discover which machines are not in Autopilot

So the first thing we want to do is to be able to connect to our Intune tenancy which we can use the following

Install-Module AzureAD
Install-Module WindowsAutopilotIntune
Install-Module Microsoft.Graph.Intune
Connect-MSGraph

This portion will allow you to connect to your Endpoint Manager tenancy using MS Graph. As we are not pre-caching any credentials you'll need to login manually.

You should then see the connection details of your UPN and TenantId. Once done then use the following commands

$DevicesInIntune = Get-IntuneManagedDevice -Filter "operatingsystem eq 'Windows'" | Get-MSGraphAllPages | Select Userdisplayname, devicename, serialnumber, manageddeviceid
$DevicesInIntune | ForEach-Object {$_.serialnumber} {If (Get-AutopilotDevice -Serial $_.serialnumber)
{$_.Devicename + " " + $_.serialnumber + " Yes"} else {$_.Devicename + " " + $_.serialnumber + " No"}} | Out-File C:\Temp\Autopilotnotregistered.txt

This should then produce a text file with all of your machines according to what you have in Intune so that you have an accurate understanding of what is actually in Autopilot and what isn't.

Tips for Intune Device Filtering

Bear in mind that when you run the Get-IntuneManagedDevice command with no filter you will get every single device, whether it be Windows, iOS or Android. This is important to note as you may get every single device and it won't make much sense as Autopilot is only for Windows devices, which is why the code above limits it to only Windows devices.

You can however change these filters if you wanted to limit it down to a specific vendor.

For example Get-IntuneManagedDevice -Filter "Manufacturer eq 'HP'" if requiring to narrow the search down where required.

by D Walsham 13 Dec, 2021
Looking through the current SQL Server topology and how it affects our decision
by D Walsham 07 Oct, 2021
Introduction
by D Walsham 06 Oct, 2021
Introduction
by D Walsham 12 Aug, 2021
All the parts of the series we went into great detail about how we analyse an end to end solution and how we would design a solution in which would allow us to build endpoints without SCCM being a dependency. Whilst we did this, there is another scenario which we have not touched on yet, which is the hybrid scenarios. In a perfect world ideally you would have your Azure Active Directory within the cloud, every machine meets the recommended requirements for Windows 10, everything is imported into Intune/Autopilot and everyone is happy. But we know this isn't realistic in all cases. Many organisations cannot just simply up and go from on-premise into the cloud therefore the checkpoint here is of course getting into hybrid solutions such as; Co-Management Between Intune and SCCM Hybrid AD with Azure AD and On-Premise AD syncing together These things can play a very interesting part in how you would tackle this if you envisage the next step in the blueprint is to be in a position in which you can build and manage endpoints soley within Intune. With this final part of the series we will go in-depth in how the common hybrid setups look like and how we go about moving into the next step of being able to manage and build devices without SCCM.
by D Walsham 29 Jul, 2021
In continuation from the previous part where we had discussed how we create the "on site" piece of the solution, this was the part which would allow us to get our endpoints into a state in which they would essentially be ready to go through the Autopilot process. Which leaves our next piece of the puzzle, to begin the configuration of the actual backend side that resides within our Endpoint Management console. And you will see how everything ties up together to satisfy the full end to end process of getting an unknown (or known) device to proceed thorough the whole workflow to be finally managed by Intune without the aid of SCCM taking part in any of the prerequisites or preparation at hand.
by D Walsham 15 Jul, 2021
In this part we are now going to look into the technical step by step points on how we put everything together. In the previous part we spoke about the structure of how we would asses whether a machine was actually ready to be built with Autopilot or not with a build checklist process which would step through all areas which would cover an endpoints eligibility. Now with everything planned out we finally want to step into making things reality by putting everything together.
by D Walsham 24 Jun, 2021
So just to recap on the previous part of this series we covered a base scenario of where we would utilise other products as a dependency to provision or even pre-provision endpoints before getting them to a state where they can be auto-enrolled and then into Autopilot - in this case this would be around SCCM. We also detailed in a diagram form of where we ideally want to be, and that's to not have any dependency when it comes to the provisioning of the endpoints where its also soley performed within Intune. This part we will be going into the nitty gritty of how this works.
Show More
Share by: