Forum Discussion
SimonAllison
Jul 05, 2018Iron Contributor
Get-WindowsAutoPilotInfo - A quicker way...
Hi All Just a Tip from me to make it easier (if you got other ways, let me know, would be interested) Starting to deploy via Autopilot but first grabbing the information - so I am using ...
Mr_Cuddy
Oct 21, 2021Copper Contributor
Instead of
PowerShell -NoProfile -ExecutionPolicy Unrestricted -Command %~dp0\Get-WindowsAutoPilotInfo.ps1 -ComputerName $env:computername -OutputFile %~dp0\computers.csv -append,
Leave out the -ComputerName variable:
PowerShell -NoProfile -ExecutionPolicy Unrestricted -Command %~dp0\Get-WindowsAutoPilotInfo.ps1 -OutputFile %~dp0\computers.csv -append
This defaults the script to localhost, which is what the script sees (I believe) in the OOB screen. Either way, it works.
Dec 30, 2021
Why are you still using .csv files? You can run Get-Windowsautopilotinfo.ps1 -Online to upload it straight to your tenant.
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Install-PackageProvider NuGet -MinimumVersion 2.8.5.201 -Force | Out-Null
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Script -Name get-WindowsAutoPilotInfo -Force
Get-WindowsAutoPilotInfo.ps1 -Online
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Install-PackageProvider NuGet -MinimumVersion 2.8.5.201 -Force | Out-Null
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Script -Name get-WindowsAutoPilotInfo -Force
Get-WindowsAutoPilotInfo.ps1 -Online
- May 30, 2023Yes, but is the provided user an Intune Administrator role user? Does it have an Intune license assigned?
Alternatively, you could try this
https://powershellisfun.com/2022/07/09/upload-windows-autopilot-hardware-hash/
(my blog post) - NathanPinottiMay 30, 2023Copper Contributor
Harm_Veenstra, hi man! Did you manage to use it?
The documentation says that we need Intune admin to get the hash uploaded but when trying it says I don't have the permission. - SimonAllisonMay 02, 2022Iron ContributorYes it must have had some updates, and can go straight to tenant now, easy, but this was setup so you dont have to use the internet as these were offline laptops, but great if you can spare a network connection, I had all 60 laptops in a row, and so then created this script and thanks all of you with trying to get it to work and workarounds, its very helpful for others.