Jump to content

Recommended Posts

Posted

Hi guys,

Just wondering what would be the most efficient way to do this.

I have an M365 tenancy and a number of devices on a local AD. We are scrapping this and putting the devices on the cloud.

Currently, I have been resetting devices, when the Windows 10/11 setup screen shows, pressing Shift + F10, loading PowerShell and entering in the following:

 

Set-ExecutionPolicy bypass
Install-Script get-windowsautopilotinfo (agreen to each thing it wants to install)
Get-WindowsAutoPilotInfo.ps1 - Online

Then entering in my administrator details for the M365 tenancy.

Locating the new device in Entra and adding it to the apropriate group on M365 as well as renaming the Host Name if needed.

 

This is working nicely, but soon, I will have a large number of devices to enroll, so I was wondering if there is a better and faster way to do this? The devices are not new, so I don't have a nice list of serial numbers and models.

Just to be able to do the above PowerShell commands faster would be a big improvement.

 

Any suggestions would be greatly appreciated. :o

Posted

If the devices are still on the network you can get the hash remotely off them without needing to rebuild/reset, then just bulk import via CSV into Autopilot

 

Steve

  • Thanks 2
Posted
If the devices are still on the network you can get the hash remotely off them without needing to rebuild/reset, then just bulk import via CSV into Autopilot

 

Steve

 

Thanks Steve, that is good to know. How would I go about doing that and if I prefer to just wipe and have a clean install, is there a faster way of doing it than I am already doing?

Posted

I have tested what Steve suggested rather than used for a full deployment, but...

 

If you do as he suggests and grab the hashes (I'd have to look up instructions on that bit) and then add the devices in bulk to Intune, you can do your clean rebuild afterwards. As soon as they're connected to the internet, your nice clean machines will be Intune managed.

Posted

You can mass-collect the hardware hashes a few ways: https://learn.microsoft.com/en-us/autopilot/add-devices#collect-the-hardware-hash.

 

We did ours primarily using Configuration Manager (SCCM). We then imported the CSV from ConfigMgr in to Autopilot and already had dynamic device groups set up to assign them an Autopilot profile.

 

We also did some using Windows Autopilot deployment for existing devices (only supports user-driven, not self-deploy) which uses a JSON file during a task sequence to enrol them and register the device in Autopilot.

 

For all of our devices, we did a clean Windows 11 install, worked well!

 

You could probably modify the PowerShell script to save the hash to a SMB share or something if you don't have ConfigMgr though.

  • Thanks 1
Posted
You can mass-collect the hardware hashes a few ways: https://learn.microsoft.com/en-us/autopilot/add-devices#collect-the-hardware-hash.

 

We did ours primarily using Configuration Manager (SCCM). We then imported the CSV from ConfigMgr in to Autopilot and already had dynamic device groups set up to assign them an Autopilot profile.

 

We also did some using Windows Autopilot deployment for existing devices (only supports user-driven, not self-deploy) which uses a JSON file during a task sequence to enrol them and register the device in Autopilot.

 

For all of our devices, we did a clean Windows 11 install, worked well!

 

You could probably modify the PowerShell script to save the hash to a SMB share or something if you don't have ConfigMgr though.

 

 

Hmmmmmmmm!! Thank you. Very interesting.

I feel like the PS script might be the best way forward. As an example, I have an ICT Suite OU with 32 computers in it. I am trying to wrap my head around how I could execute that PS on all 32 and have it put the info somewhere for me to then upload the CSV hashes to Intune. I could then manually wipe each one and log it in as M365 admin and it should be joined. I did a test last week and it worked perfeclty. Just trying to thinkl of the best way to get all of those hashes easily. We don't have SCCM unfortunately. :confused:

Posted

I recently found out when using get-windowsautopilotinfo that you can use -AssignedComputerName to pass it the name you want for the computer when it's added to your tenant.

Example: Get-WindowsAutoPilotInfo -online -AssignedComputerName TestPC1

 

I've been using this when adding new computers for the past week.

  • Thanks 2
Posted
I recently found out when using get-windowsautopilotinfo that you can use -AssignedComputerName to pass it the name you want for the computer when it's added to your tenant.

Example: Get-WindowsAutoPilotInfo -online -AssignedComputerName TestPC1

 

I've been using this when adding new computers for the past week.

 

Thank you, that will save me a lot of time! Really useful! :cool:

Posted

You can use script that auto uploads the hash to your Intune tenant. No messing about with CSV files. We’ve recently used this, and I had the script deploy to all the machines we manage for the trust using our Datto RMM

 

That means for the most part, we turn up, install Windows 11 and the rest runs its self with Intune setup, dynamic groups etc.

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...