Skip to content

Instantly share code, notes, and snippets.

@MarcoGriep88
Last active October 23, 2025 07:36
Show Gist options
  • Select an option

  • Save MarcoGriep88/5d7f966d87e1ce4073978a731738a34b to your computer and use it in GitHub Desktop.

Select an option

Save MarcoGriep88/5d7f966d87e1ce4073978a731738a34b to your computer and use it in GitHub Desktop.
syspre-oobe-skip.xml
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideLocalAccountScreen>true</HideLocalAccountScreen>
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Other</NetworkLocation>
<ProtectYourPC>3</ProtectYourPC>
<SkipMachineOOBE>true</SkipMachineOOBE>
<SkipUserOOBE>true</SkipUserOOBE>
<UnattendEnableRetailDemo>false</UnattendEnableRetailDemo>
</OOBE>
</component>
</settings>
</unattend>
@MarcoGriep88
Copy link
Author

MarcoGriep88 commented Oct 23, 2025

Use it with:

$sourceXML = "https://gist.githubusercontent.com/MarcoGriep88/5d7f966d87e1ce4073978a731738a34b/raw/b799b8483c9287b2977dad8fb04257206b783295/gistfile1.txt"

$tempPath = "$($env:TEMP)\oobe"

if (-Not (Test-Path -Path $tempPath)) {
    New-Item -ItemType Directory -Path $tempPath -Force -ErrorAction SilentlyContinue
}

$destitionPath = "$($env:TEMP)\oobe\deploy.xml"

Invoke-WebRequest -Uri $sourceXML -Method Get -OutFile $destitionPath -ErrorAction Stop

Write-Host "Successfully downloaded file $($destitionPath)"

Write-Host "Run Sysprep now? (Y/n):"

$answer = Read-Host

if ($answer -eq "Y" -or "" -or $null) {
    Write-Host "Starting Sysprep..."
    Start-Process -FilePath "C:\Windows\System32\Sysprep\sysprep.exe" `
        -ArgumentList "/generalize", "/shutdown", "/oobe", "/unattend:$($env:TEMP)\oobe\deploy.xml" `
        -Wait

    Write-Host "Sysprep successfull"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment