Skip to content

Instantly share code, notes, and snippets.

@Aetopia
Aetopia / README.md
Last active September 17, 2026 17:33
Native Image Generator For Windows + PowerShell.

Native Image Generator For Windows + PowerShell

Important

Only modules available globally will be compiled.

  • Compiles assemblies for loaded modules & PowerShell.
    • Additionally compiles Windows Metadata files.
  • Invokes any pending NGEN tasks for installed versions of .NET Framework.
@Aetopia
Aetopia / Script.cmd
Last active September 12, 2026 22:15
Runs DISM & SFC to repair an online Windows image.
rundll32.exe pnpclean.dll,RunDLL_PnpClean /devices /drivers /files /maxclean
rundll32.exe appxdeploymentclient.dll,AppxCleanupOrphanPackages
DISM.exe /Online /Cleanup-Image /RestoreHealth
sfc.exe /scannow
DISM.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase
shutdown /r /t 0 /f