{"id":545,"date":"2024-10-09T07:57:02","date_gmt":"2024-10-09T07:57:02","guid":{"rendered":"https:\/\/blog.tomtechproductions.be\/?p=545"},"modified":"2025-01-15T14:02:23","modified_gmt":"2025-01-15T14:02:23","slug":"create-bootable-usb-w-windows-11-incl-autopilot-json-file","status":"publish","type":"post","link":"https:\/\/blog.tomtechproductions.be\/index.php\/2024\/10\/09\/create-bootable-usb-w-windows-11-incl-autopilot-json-file\/","title":{"rendered":"Create bootable USB w. Windows incl. Autopilot JSON file"},"content":{"rendered":"\n<p><strong>Download Windows ISO<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/www.microsoft.com\/en-us\/software-download\/windows11\">https:\/\/www.microsoft.com\/en-us\/software-download\/windows11<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Export Autopilot<\/h2>\n\n\n\n<p><strong>Open Powershell as Administrator<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force\nInstall-Module -Name WindowsAutopilotIntune -MinimumVersion 5.4.0 -Force\nInstall-Module -Name Microsoft.Graph.Groups -Force\nInstall-Module -Name Microsoft.Graph.Authentication -Force\nInstall-Module Microsoft.Graph.Identity.DirectoryManagement -Force\n\nImport-Module -Name WindowsAutopilotIntune -MinimumVersion 5.4\nImport-Module -Name Microsoft.Graph.Groups\nImport-Module -Name Microsoft.Graph.Authentication\nImport-Module -Name Microsoft.Graph.Identity.DirectoryManagement<\/code><\/pre>\n\n\n\n<p><strong>Connect to Entra in Powershell<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Connect-MgGraph -Scopes \"Device.ReadWrite.All\", \"DeviceManagementManagedDevices.ReadWrite.All\", \"DeviceManagementServiceConfig.ReadWrite.All\", \"Domain.ReadWrite.All\", \"Group.ReadWrite.All\", \"GroupMember.ReadWrite.All\", \"User.Read\"<\/code><\/pre>\n\n\n\n<p><strong>Export all autopilot profiles<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Connect-MgGraph -Scopes \"Device.ReadWrite.All\", \"DeviceManagementManagedDevices.ReadWrite.All\", \"DeviceManagementServiceConfig.ReadWrite.All\", \"Domain.ReadWrite.All\", \"Group.ReadWrite.All\", \"GroupMember.ReadWrite.All\", \"User.Read\"\n$AutopilotProfile = Get-AutopilotProfile\n$targetDirectory = \"C:\\Autopilot\"\n$AutopilotProfile | ForEach-Object {\n    New-Item -ItemType Directory -Path \"$targetDirectory\\$($_.displayName)\"\n    $_ | ConvertTo-AutopilotConfigurationJSON | Set-Content -Encoding Ascii \"$targetDirectory\\$($_.displayName)\\AutopilotConfigurationFile.json\"\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Export drivers<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>Export-WindowsDriver \u2013Online -Destination C:\\DATA\\Drivers<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"702\" height=\"659\" src=\"https:\/\/blog.tomtechproductions.be\/wp-content\/uploads\/2024\/10\/image-1.png\" alt=\"\" class=\"wp-image-563\" srcset=\"https:\/\/blog.tomtechproductions.be\/wp-content\/uploads\/2024\/10\/image-1.png 702w, https:\/\/blog.tomtechproductions.be\/wp-content\/uploads\/2024\/10\/image-1-300x282.png 300w, https:\/\/blog.tomtechproductions.be\/wp-content\/uploads\/2024\/10\/image-1-360x338.png 360w\" sizes=\"auto, (max-width: 702px) 100vw, 702px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Insert data in to iso<\/h2>\n\n\n\n<p><strong>Get the info from the original iso file, this one is mounted on your pc. <\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Dism \/get-wiminfo \/wimfile:\"E:\\sources\\install.wim\"<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"691\" src=\"https:\/\/blog.tomtechproductions.be\/wp-content\/uploads\/2024\/10\/image.png\" alt=\"\" class=\"wp-image-560\" srcset=\"https:\/\/blog.tomtechproductions.be\/wp-content\/uploads\/2024\/10\/image.png 768w, https:\/\/blog.tomtechproductions.be\/wp-content\/uploads\/2024\/10\/image-300x270.png 300w, https:\/\/blog.tomtechproductions.be\/wp-content\/uploads\/2024\/10\/image-360x324.png 360w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure>\n\n\n\n<p><strong>Create the wim file from the selected version<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Dism \/export-image \/SourceImageFile:\"E:\\sources\\install.wim\" \/SourceIndex:6 \/DestinationImageFile:C:\\DATA\\WIM\\install.wim \/Compress:max \/CheckIntegrity<\/code><\/pre>\n\n\n\n<p><strong>Lets mount the wim file<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Dism \/mount-wim \/wimfile:\"C:\\DATA\\WIM\\install.wim\" \/index:1 \/mountdir:C:\\DATA\\Mount <\/code><\/pre>\n\n\n\n<p><strong>Insert autopiltfile<\/strong><\/p>\n\n\n\n<p>After WIM is mounted \u2013 Copy&nbsp;<strong>AutopilotConfigurationFile.jso<\/strong>n to: <strong>%MountDir%\\Windows\\Provisioning\\Autopilot\\<\/strong><\/p>\n\n\n\n<p><strong>Insert drivers<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dism \/image:C:\\DATA\\Mount \/add-driver \/driver:C:\\temp\\drivers\\ \/recurse<\/code><\/pre>\n\n\n\n<p><strong>WIM file commit and unmount<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Dism \/Commit-Image \/MountDir:C:\\DATA\\Mount \nDism \/Unmount-Image \/MountDir:C:\\DATA\\Mount \/commit <\/code><\/pre>\n\n\n\n<p><strong>Split file size to USB<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Dism \/Split-Image \/ImageFile:\"C:\\DATA\\WIM\\install.wim\" \/SWMFile:\"C:\\DATA\\SWM\\install.SWM\" \/FileSize:3800 <\/code><\/pre>\n\n\n\n<p><strong>Copy SWM files to sources<\/strong> (USB)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"449\" src=\"https:\/\/blog.tomtechproductions.be\/wp-content\/uploads\/2024\/10\/image-2-1024x449.png\" alt=\"\" class=\"wp-image-569\" srcset=\"https:\/\/blog.tomtechproductions.be\/wp-content\/uploads\/2024\/10\/image-2-1024x449.png 1024w, https:\/\/blog.tomtechproductions.be\/wp-content\/uploads\/2024\/10\/image-2-300x132.png 300w, https:\/\/blog.tomtechproductions.be\/wp-content\/uploads\/2024\/10\/image-2-768x337.png 768w, https:\/\/blog.tomtechproductions.be\/wp-content\/uploads\/2024\/10\/image-2-1536x674.png 1536w, https:\/\/blog.tomtechproductions.be\/wp-content\/uploads\/2024\/10\/image-2-1125x493.png 1125w, https:\/\/blog.tomtechproductions.be\/wp-content\/uploads\/2024\/10\/image-2-360x158.png 360w, https:\/\/blog.tomtechproductions.be\/wp-content\/uploads\/2024\/10\/image-2.png 1856w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Troubelshooting<\/strong> &#8211; OOBE Problems<\/p>\n\n\n\n<p>Shift-F10 <\/p>\n\n\n\n<p>MDMDiagnosticsTool.exe -area Autopilot;TPM -cab c:\\autopilot.cab<\/p>\n\n\n\n<p><strong>Sources<\/strong><\/p>\n\n\n<p><a href=\"https:\/\/www.simsenblog.dk\/2022\/02\/06\/bootable-windows-11-incl-autopilot-json-file\/\">https:\/\/www.simsenblog.dk\/2022\/02\/06\/bootable-windows-11-incl-autopilot-json-file\/<\/a><\/p>\n\n\n<p><a href=\"https:\/\/learn.microsoft.com\/en-us\/autopilot\/tutorial\/existing-devices\/setup-autopilot-profile\">https:\/\/learn.microsoft.com\/en-us\/autopilot\/tutorial\/existing-devices\/setup-autopilot-profile<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Download Windows ISO https:\/\/www.microsoft.com\/en-us\/software-download\/windows11 Export Autopilot Open Powershell as Administrator Connect to Entra in Powershell Export all autopilot profiles Export drivers Insert data in to iso Get the info from the original iso file, this one is mounted on your pc. Create the wim file from the selected version Lets mount the wim file Insert &hellip; <span class=\"read-more\"><a href=\"https:\/\/blog.tomtechproductions.be\/index.php\/2024\/10\/09\/create-bootable-usb-w-windows-11-incl-autopilot-json-file\/\" class=\"more-link\">Read More<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[45,7],"tags":[],"class_list":["post-545","post","type-post","status-publish","format-standard","hentry","category-intune","category-windows"],"_links":{"self":[{"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/posts\/545","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/comments?post=545"}],"version-history":[{"count":17,"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/posts\/545\/revisions"}],"predecessor-version":[{"id":573,"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/posts\/545\/revisions\/573"}],"wp:attachment":[{"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/media?parent=545"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/categories?post=545"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.tomtechproductions.be\/index.php\/wp-json\/wp\/v2\/tags?post=545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}