Are you blocked from adding devices to Windows Autopilot because PowerShell can’t download NuGet? 😩 You’re not alone—many IT admins hit this wall, especially on corporate networks with strict firewalls. Good news: this proven workaround lets you extract your device’s Autopilot hardware hash, no need to download NuGet in PowerShell!
Let’s get you back on track for smooth Windows deployments! 💡
📦 Download the Required PowerShell Script Manually
We’ll get the official script directly from Microsoft’s PowerShell Gallery as a .nupkg
package and extract it easily.
1. Visit: Get-WindowsAutopilotInfo PowerShell Gallery page
2. Click on Manual Download
.
(This will download a file named Get-WindowsAutopilotInfo.3.9.nupkg
)
3. Extract the .nupkg file:
– Right-click it and select Extract Here or Extract to folder using 7-Zip or a similar tool.
– Open the extracted folder. Inside, go to the tools folder.
– Locate the script file: Get-WindowsAutopilotInfo.ps1
Tip: Always verify PowerShell scripts come from trusted sources!
📁 Create a Folder for the Script
For better organization, let’s create a dedicated folder:
– Open File Explorer.
– Go to *C:* (your main drive).
– Right-click > *New* > Folder.
– Name your new folder: HWID
📝 Move the Script into the Folder
– Copy the Get-WindowsAutopilotInfo.ps1 file you just downloaded.
– Paste it into C:\HWID
🏁 Run PowerShell as Administrator
To avoid permission hassles, make sure you’re running with the right privileges:
– Click Start.
– Type PowerShell.
– Right-click Windows PowerShell, select Run as administrator. 👩💻
🛡️ Temporarily Set Execution Policy
This allows your session to run the script (without changing global settings):
PowerShell C:\>Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned
This is a safe, session-only change!
📂 Change Directory to Your Working Folder
Navigate into the directory where you placed the script:
PowerShell C:\>cd C:\HWID
▶️ Run the Script to Extract the Autopilot Hardware Hash
Now, let’s get your hardware hash and save it as a .CSV (ready for Intune):
PowerShell C:\>.\Get-WindowsAutopilotInfo.ps1 -OutputFile AutopilotHWID.csv
– Wait a moment for the script to finish.
– You’ll now have a file: AutopilotHWID.csv in C:\HWID
.

✅ What Next? Import Into Intune
Ready to register your device with Windows Autopilot!
1. Log in to the Microsoft Intune admin center.
2. Go to Devices > Windows > Windows enrollment > Devices (under Autopilot section).
3. Click Import and upload your brand new AutopilotHWID.csv
file.
🎉 Done! Your hardware hash is now ready for Autopilot deployments—no more NuGet headaches.
🛠️ Troubleshooting & Tips
– If you get execution policy errors, check that you ran PowerShell as Administrator and used the supplied command.
– This guide works great in restricted/corporate networks where the NuGet module can’t be downloaded.
– Always scan external scripts with VirusTotal or similar to ensure safety.
💬 Did This Work For You?
Let us—and the community—know below!👇
How many of you managed to resolve your issue with this guide? Did anything trip you up, or do you have tips for fellow admins? Your feedback helps everyone!
🔧 Leave a comment with your story, questions, or suggestions.
Thanks for reading, and happy deploying! 🚀
I have been searching for this solution long back thanks to proithub.com team who created this post step by step.I have resolved my issue with your blog
Thank you once again.I will be sharing this post with all my teams and bookmark your site for future post
Thank you so much for your kind words! We’re thrilled to hear that our blog has been helpful to you.If you have any topics in mind that you’d like us to cover, please let us know. Our Proithub team is always eager to publish content that benefits our readers. Thanks again for your support!
Great website. Lots of helpful info here. I’m sending it to a few buddies ans also sharing in delicious. And certainly, thank you in your sweat!
Thank you so much for your kind words! We’re thrilled to hear that our blog has been helpful to you.If you have any topics in mind that you’d like us to cover, please let us know. Our Proithub team is always eager to publish content that benefits our readers. Thanks again for your support!