,

Create an USB Drive for Windows Server 2025 Installation

Create an USB Drive for Windows Server 2025 Installation

This blog post explains how to create a bootable USB drive for installing Windows Server 2025 on a physical server. The guide utilizes only the built-in tools available in Windows 10, Windows 11, or Windows Server. The installation process varies slightly depending on your system; it can be installed on either a BIOS system, which uses an MBR disk, or a UEFI-based system, which uses GPT disks. Follow these steps to prepare a USB drive for Windows Server 2025 installation.

Getting ready to create a USB Drive for a Windows Server 2025 Installation

First, you will need to have all the prerequisites in place.

  • To download the Windows Server 2025 ISO file, you have various sources available. If you wish to test Windows Server 2025 without a license, you can obtain it from the evaluation center.
  • An USB drive with at least 8GB size

Windows Server 2025 USB Thumb Drive for UEFI (GPT) systems

To create the USB drive to install Windows Server 2025 on a UEFI (GPT system, you do the following steps:

  • The at least an 8GB USB drive has to be formatted in FAT32
  • The USB needs to be GPT and not MBR
  • You will need to split the wim file using dism since it is larger than 4GB
  • Copy all files from the ISO to the USB drive

This is it, and here is how you do it. First, plug in your USB drive to your computer.

Open a PowerShell using the Run as Administrator option. You will need to change the path of the Windows Server 2025 ISO, and you will need to replace the disk number in the script before running the third command and make sure C:\Temp exists. From previous experiences with users, run the script line by line.

REMINDER: The following commands will wipe the USB Drive completely. Backup everything before you run through the PowerShell.

# Define Path to the Windows Server 2025 ISO
$ISOFile = "C:\Temp\WindowsServer2025.iso"

# Create temp diectroy for new image
$newImageDir = New-Item -Path 'C:\Temp\newimage' -ItemType Directory

# Mount iso
$ISOMounted = Mount-DiskImage -ImagePath $ISOFile -StorageType ISO -PassThru

# Driver letter
$ISODriveLetter = ($ISOMounted | Get-Volume).DriveLetter

# Copy Files to temporary new image folder 
Copy-Item -Path ($ISODriveLetter +":\*") -Destination C:\Temp\newimage -Recurse

# Split and copy install.wim (because of the filesize)
dism /Split-Image /ImageFile:C:\Temp\newimage\sources\install.wim /SWMFile:C:\Temp\newimage\sources\install.swm /FileSize:4096

 
# Get the USB Drive you want to use, copy the disk number
Get-Disk | Where BusType -eq "USB"
 
# Get the right USB Drive (You will need to change the number)
$USBDrive = Get-Disk | Where Number -eq 2
 
# Replace the Friendly Name to clean the USB Drive (THIS WILL REMOVE EVERYTHING)
$USBDrive | Clear-Disk -RemoveData -Confirm:$true -PassThru
 
# Convert Disk to GPT
$USBDrive | Set-Disk -PartitionStyle GPT
 
# Create partition primary and format to FAT32
$Volume = $USBDrive | New-Partition -Size 8GB -AssignDriveLetter | Format-Volume -FileSystem FAT32 -NewFileSystemLabel WS2025
 
# Copy Files to USB (Ignore install.wim)
Copy-Item -Path C:\Temp\newimage\* -Destination ($Volume.DriveLetter + ":\") -Recurse -Exclude install.wim

# Dismount ISO
Dismount-DiskImage -ImagePath $ISOFile

After that, you can safely remove the USB drive and use it to boot your server from.

Create an USB Drive for Windows Server 2022 Installation
Create an USB Drive for Windows Server 2025 Installation

Windows Server 2025 USB Thumb Drive for BIOS (MBR) systems

To create the USB drive to install Windows Server 2025 on BIOS (MBR) systems, you can follow these steps:

  • The at least an 8GB USB drive has to be formatted in NTFS
  • USB drive needs to us MBR
  • The partition needs to be set active
  • Copy all files from the ISO to the USB Drive

This is it, and here is how you do it. First, plug in your USB drive to your computer.

Open a PowerShell using the Run as Administrator option. You will need to change the path of the Windows Server 2025 ISO, and you will need to replace the disk number in the script before running the third command and make sure C:\Temp exists. From previous experiences with users, run the script line by line.

REMINDER: The following commands will wipe the USB Drive completely. Backup everything before you run through the PowerShell.

# Define Path to the Windows Server 2025 ISO
$ISOFile = "C:\Temp\WindowsServer2025.iso"
 
# Get the USB Drive you want to use, copy the friendly name
Get-Disk | Where BusType -eq "USB"
 
# Get the right USB Drive (You will need to change the FriendlyName)
$USBDrive = Get-Disk | Where FriendlyName -eq "Kingston DT Workspace"
 
# Replace the Friendly Name to clean the USB Drive (THIS WILL REMOVE EVERYTHING)
$USBDrive | Clear-Disk -RemoveData -Confirm:$true -PassThru
 
# Convert Disk to MBR
$USBDrive | Set-Disk -PartitionStyle MBR
 
# Create partition primary and format to NTFS
$Volume = $USBDrive | New-Partition -UseMaximumSize -AssignDriveLetter | Format-Volume -FileSystem NTFS -NewFileSystemLabel WS2025
 
# Set Partiton to Active
$Volume | Get-Partition | Set-Partition -IsActive $true
 
# Mount ISO
$ISOMounted = Mount-DiskImage -ImagePath $ISOFile -StorageType ISO -PassThru
 
# Driver letter
$ISODriveLetter = ($ISOMounted | Get-Volume).DriveLetter
 
# Copy Files to USB
Copy-Item -Path ($ISODriveLetter +":\*") -Destination ($Volume.DriveLetter + ":\") -Recurse
 
# Dismount ISO
Dismount-DiskImage -ImagePath $ISOFile

After completing these steps, you may safely eject the USB drive and use it to boot your server for the installation of Windows Server 2025. For exmaple you can use this media to install it on a phyiscial server or even on an Intel NUC for Windows Server labs.

Conclusion

I trust this post has been informative. Should you have any inquiries, feel free to ask in the comments section.

11 responses

  1. Colin Rippey Avatar
    Colin Rippey

    Great post as always. Quick note the link to the Volume License Center is out of date it seems.

    1. Thomas Maurer Avatar

      Thanks! Will have a look

  2. nascent Avatar

    Thanks for this!

    Fyi, you can replace:
    $USBDrive = Get-Disk | Where FriendlyName -eq “Kingston DT Workspace”
    with
    $USBDrive = Get-Disk | Where BusType -eq “USB” | OGV -Passthru
    to make it more user-friendly and no longer be reliant on hard coded names/numbers

    1. Thomas Maurer Avatar

      Thank you, yes this is great. I remember thinking about this, the reason I decided I did it the other way, is that if a customer has multiple USB drives in the computer, I don’t want to format the wrong one by running the command :) (Kind of a safety net
      But yes your comment is right!

  3. jim Avatar

    Thanks for this, I was having problems with the usb image I created.

  4. zulf Avatar

    Over-complicated. Please just use Rufus (portable) instead, takes 10 secs to choose USB drive, ISO and config you need and away it goes.

    1. Andreas Hartig Avatar

      While i do prefer Rufus too, there is always a reason to remember the powershell way. I keep the copy of Thomas in my toolbox!
      Understand the basics of your IT world and not rely on 3rd party. This get’s important when you get into high secure (space, defense, kritis,…) environments.

  5. Alex R Avatar
    Alex R

    Which Windows Terminal theme are you using?

  6. Stephen Avatar
    Stephen

    Hi,

    It is the problem:

    # Copy Files to USB
    Copy-Item -Path ($ISODriveLetter +”:\*”) -Destination ($Volume.DriveLetter + “:\”) -Recurse

    Copy-Item : Cannot find path ‘C:\Temp\:\’ because it does not exist.
    At line:1 char:1
    + Copy-Item -Path ($ISODriveLetter +”:\*”) -Destination ($Volume.DriveL …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (C:\Temp\:\:String) [Copy-Item], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyItemCommand

  7. zerotech Avatar
    zerotech

    Hey Thomas!

    Great instructions and everything worked perfectly. The one minor thing I noticed. The command “-NewFileSystemLabel WS2025” doesn’t show the name in Windows Explorer but shows it in Disk Management.
    ¯\_(ツ)_/¯

    I was wondering, If someone had a larger USB drive and wanted to create multiple install partitions on it (say one for WS2019, WS2022, and WS2025 all on one drive) what would be the command for that? Since all the “$USBDrive = Get-Disk” commands will simply pull the USB device and not the partitions on the USB device. Is there a way to get, format, and prepare multiple partitions on one disk instead?

    Again, thank you for the tutorial that actually worked out of the box!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.