Create primary partition
diskpart
list disk
select disk
- append your disk number at last. Choose your disk properly.list partition
list volume
clean
- caution: this formats everything on disk without confirmation. so double check you selected proper disk.create partition primary
format quick fs=ntfs
caution: normal formatting takes too much of time.active
- marks partition as active.assign LETTER=C
- assign some letter. and it’s optional.exit
Create bootable USB
- Create primary partition.
- Copy all installation media content nromally.
Run a VM on a physcial machine.
Creating a WIM file.
- Create a full backup of your server/client os on to a pendrive or shared location.
- Take a USB(pendrive or HDD) connect it to your machine. And execute below scripts.
- Am considering driver letter as “D”
md D:\Mount, D:\Capture
Mount-WindowsImage -ImagePath "D:\full_path_to.vhdx" -Path D:\Mount -Index 1
- Once mounted if you want to clean any unneccesary file then you can do at this step. like cache folders, app data content, temp folders, windows updates folders etc.
New-WindowsImage -CapturePath D:\Mount -Name WinBackup -ImagePath D:\Capture\Backup.wim -Description "Windows Backup" -Verify
- this takes time and it won’t show any progress for a quite good amount of time based on your backup size.Dismount-WindowsImage -Path D:\Mount -Discard
- dismount image once completed.
Installing WIM file.
- Create a bootable USB(pendrive or HDD). Better to have another srive or copy the contents of D drive and then do this step else you will loose you WIM file created in above process.
- Ensure to have the respective OS bootable files in the drive. In my case I used win server 2019.
- Once you have the bootable USB to install fresh windows, then create a folder called “Softwares” and move your WIM file and also any other softwares/drivers if you need. Now you have the USB with bootable windows server and WIM file.
- Ensure to boot from the USB and let windows shows its installation screen. Find the repair option in the same screen and proceed Repair Computer” > “Troubleshoot” > “Advanced Options” > “Command Prompt.
- Now follow the below steps. The command prompt will open “X:\Sources”
- Follow Create primary partition section above.
- Go back to X Drive.
Dism /Apply-Image /ImageFile:D:\Capture\Backup.wim /Index:1 /ApplyDir:C:\
- Once done then create boot files.
bcdboot C:\Windows /S C:
- Remove the pen drive and change the boot order to Windows Boot Manager.
Domain Controller Not reacing issue
- Use
nltest
command nltest /sc_verify:domain_full_name
Get Windows Key
wmic path softwarelicensingservice get OA3xOriginalProductKey