Forum Discussion
Get-WindowsAutoPilotInfo - A quicker way...
SimonAllison Do you know if it's possible to use this without completing Windows setup. ie During OOBE after networking has been setup?
Andycap147 the whole process was designed that I know of to run under OOBE, you cant do it on pre-existing setups as it was all designed to run out of the box on new surface devices, as in the background and permissions, and apps etc are from Azure AD and Intune.
I was looking for the same setup where you could use pre-existing windows setups, but sadly it wasnt the case, as you would loose all existing apps.
sorry for the late reply
- Mr_CuddyOct 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, 2021Why 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- 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.
- muscleflexMay 20, 2021Copper Contributor
I can't get this to run... but if i run the get-windowsautopilot.ps1 manually, it works fine so something in that cmd file is not running for me. i can type them line by line and it works up to opening powershell but that's it. after i've opened up powershell from the cmd prompt, then i'm stuck and i can't get the last bit of your code working.