It's not always possible to get the required file from your hardware supplier to register your devices in autopilot. There are a number of ways you can help yourself get around that. One way is to create a CSV yourself with the help of the powershell cmdlet Get-WindowsAutopilotInfo. In the latest version you can even use it to register the device for use with autopilot without needing to first create the CSV. But sometimes it's faster to use the offline autopilot configuration file.
The offline Windows Autopilot deployment profile can be used as from Windows 10, version 1809. The file needs to be named AutoPilotConfigurationFile.json must be made available on the device (or VM) in C:\Windows\Provisioning\Autopilot. If the file is present in this folder it will guide the machine to start the autopilot configuration without having to register it.
Install-Module AzureAD -Force
Install-Module WindowsAutopilotIntune -Force
Install-Module Microsoft.Graph.Intune -Force
If you have only one profile and the path you want to save to exists you can do this with a simple oneliner after connecting to the Graph.
Connect-MSGraph
$AutopilotProfile | ConvertTo-AutopilotConfigurationJSON | Out-File C:\ExportPath\AutopilotConfigurationFile.json -Encoding ASCII
However, if you don't meet the above requirements you can use the following PowerShell lines (This script prefixes each filename with the autopilot-profile's name.):
Connect-MSGraph
$AutopilotProfiles = Get-AutopilotProfile
Foreach ($AutopilotProfile in $AutopilotProfiles) {
$TempPath = "C:\ExportPath\"
if (!(Test-Path $TempPath)) {
New-Item -Path $TempPath -ItemType Directory -Force
}
$name = $AutopilotProfile.displayName
$ExportPath = $TempPath + $name + "_AutopilotConfigurationFile.json"
$AutopilotProfile | ConvertTo-AutopilotConfigurationJSON | Out-File $ExportPath -Encoding ASCII
}
If you haven't yet, you should check out Nicola Suter's "Modern Workplace Concierge" app. Other than download these offline Autopilot profiles, this amazing webapp has lots more to offer. At the time of writing this:
You can even deploy your own instance. For example: https://mwconcierge.shellblazer.com.