Forums on Intune, SCCM, and Windows 11

Welcome to the forums. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your topics and posts, as well as connect with other members through your own private inbox!

SOLVED Autopilot (auto upload hash during SCCM Task sequence)

  • Thread starter Thread starter Richard
  • Start date Start date
  • Replies Replies 5
  • Views Views 17K
Status
Not open for further replies.

Richard

Member
Messages
5
Reaction score
1
Points
1
I bet we would help a lot of people with this. THANK YOU IN ADVANCE EVERYONE

Does anyone have a good script that I can add during a task sequence that I can automatically upload the hash to autopilot devices?
We are using SCCM task sequence to wipe bloatware from Lenovo. Just install windows. And after that we autopilot.
We have to manually upload hash if the device haven't been used for while and not picked up by mdm
Guys I really appreciate your help guys it would be more than Perfect if someone can help us with this

Theoretically this could be done. we have a service account with proper permissions created in Azure AD which has the permission to add devices to intune
Today we use this script to manually add the devices before we load them with autopilot. But it would be AMAZING if some powershell wiz kid could help us with a script where it runs the whole process below including the credentials part.

Powershell Script:
set-executionpolicy bypass
Install-script Get-WindowsAutopilotInfo -Force

confirm with Y (3 times )
Get-WindowsAutopilotInfo -Online -GroupTag: ABC123 -assign
now a window appears where its asks us to type in the credentials of a user/service account with proper permissions
below an example of how we manually import the devices as described above
 
Last edited:
Solution
Hi, Yes there is. I use this method:

Ensure you create an App Registration in Azure.

I have done a few things differently to the above guide such as: copying the sysprep script to C:\Windows\Temp and getting SCCM to run it using the SMSTSPostAction variable and removal of the CCM Client. I wasnt successful so used a different method.

Created a basic TS which installs the drivers, uploads the hardware hash, removes client and reboots to OOBE. If you need to hand these out to end-users, just press and hold the power button and it will shutdown. Then next time its turned on, they will still be presented with OOBE.

1: TS
1647217132777.png

2. Upload Hardware Hash Step: (Script is...
Hi, Yes there is. I use this method:

Ensure you create an App Registration in Azure.

I have done a few things differently to the above guide such as: copying the sysprep script to C:\Windows\Temp and getting SCCM to run it using the SMSTSPostAction variable and removal of the CCM Client. I wasnt successful so used a different method.

Created a basic TS which installs the drivers, uploads the hardware hash, removes client and reboots to OOBE. If you need to hand these out to end-users, just press and hold the power button and it will shutdown. Then next time its turned on, they will still be presented with OOBE.

1: TS
1647217132777.png

2. Upload Hardware Hash Step: (Script is in the link shared above)
Ensure to change the Client ID, Client Secret and Tenant ID in the script.
Also login to Graph Explorer and ensure you have consent as per the link.
1647217198550.png

3. Prepare Config MGR Client for Capture Step:
1647217383811.png
4. Prepare Windows for Capture step
1647217448071.png
5. Finally, add a step to restart.
Confirm if it uploaded the hardware hash:
1647217572011.png
 
Solution
Were you able to get the bloatware removed? I have been attempting to get that resolve for sometime now. I am trying to remove it in both Windows 10 & 11.
 
Were you able to get the bloatware removed? I have been attempting to get that resolve for sometime now. I am trying to remove it in both Windows 10 & 11.
Hey mate,

I have tried with windows 10 and it works just fine and removes all the crap. Windows 11 I haven't tried yet.
 
That script for importing the Hardware info looks great. I just can't get it to run and not sure where to look for errors. I haven't tried in a TS yet as I wanted to test on an existing machine first (that is not in Autopilot). Unfortunately as per my screenshot it doesn't seem to import:
 

Attachments

  • Screenshot 2022-05-19 at 09.51.38.png
    Screenshot 2022-05-19 at 09.51.38.png
    317.8 KB · Views: 77
That script for importing the Hardware info looks great. I just can't get it to run and not sure where to look for errors. I haven't tried in a TS yet as I wanted to test on an existing machine first (that is not in Autopilot). Unfortunately as per my screenshot it doesn't seem to import:
All sorted now, user error :/
 
Status
Not open for further replies.

Forum statistics

Threads
7,160
Messages
27,950
Members
18,243
Latest member
AEUK

Latest posts

Trending content

Back
Top