Boot with any windows usb dist (any versions)
Press Shift + F10 to open command line
-
diskpart -
list disk -
sel disk 0 -
list part -
cleanWARNING: all data in disk will be earsed! -
convert gpt -
create part efi size=200 -
list part -
sel part 1 -
format fs=fat32 label="System" -
assign letter="S" -
create part primary size=65537 -
sel part 2 -
format quick fs=ntfs label="Windows" -
assign letter="W" -
list vol -
exit
-
find flash drive letter (for me is D:)
wmic logicaldisk get deviceid, volumename, description -
dism /Get-WimInfo /WimFile:D:\sources\install.wim -
dism /Apply-Image /ImageFile:D:\sources\install.wim /Index:<Index from last command> /ApplyDir:W:\ -
bcdboot W:\Windows /s S: /f UEFI
When you are prompted with Let's start with a region or Get going fast, or Personalize, or Customize Settings, or Setup Windows, press CTRL+SHIFT+F3 to switch to audit mode.
DiskPart
Select Disk 0
List Part
Select Part x (recovery)
Delete Partition Override
List Part
Select Part y (windows)
Extend
List Part
ExitDISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:D:\sources\sxshttps://www.ashampoo.com/en-us/antispy-for-windows-10
irm "https://christitus.com/win" | iexGet-AppxPackage -AllUsers | Remove-AppxPackage
Get-AppxProvisionedPackage -online | Remove-AppxProvisionedPackage –onlineDownload unattend.xml file to c:\ before continue.
Remember to change the password from the file.
c:\windows\system32\sysprep\sysprep.exe /oobe /generalize /unattend:c:\unattend.xml /rebootIn virtual machine mode
c:\windows\system32\sysprep\sysprep.exe /oobe /generalize /mode:vm /unattend:c:\unattend.xml /rebootirm https://get.activated.win | iex
or
iex (curl.exe -s --doh-url https://1.1.1.1/dns-query https://get.activated.win | Out-String)slmgr.vbs /ipk KEY
slmgr /skms kms.technet24.ir
slmgr /atoImproves the performance of managed applications.
cd\
cd Windows\Microsoft.NET\Framework\v4 (and press tab)
ngen executequeueditemsClears unnecessary files from your computer's hard disk.
cleanmgr /d c: /verylowdisk /autocleanCleans unused files from the Side by Side component store.
dism /online /cleanup-image /startcomponentcleanup /resetbaseSaves space on the Windows image by running the operating system and other system files from compressed files. This strategy reduces the number of IOPS required for storage with cache and has a negligible impact on the CPU.
compact /compactos:alwaysreg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v SystemPaneSuggestionsEnabled /t REG_DWORD /d 0 /fpowercfg /h offsdelete64 -z c:
slmgr.vbs /ckms clears the name of the KMS server.
slmgr.vbs /ckhc disables KMS host caching.
ipconfig /release releases the IP address.
add RDP Wrapper (https://github.com/stascorp/rdpwrap/issues). Windows server 2025 and some other new versions of windows are not included in the current version but you can use rdp conf (which is included in the downloaded zip for rdp wrapper) to see the version code and search it in the rdp wrapper github issues.