Windows OS Hub
  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux

 Windows OS Hub / PowerShell / How to Verify a File Hash (Checksum) on Windows

November 25, 2024 PowerShellWindows 10Windows 11

How to Verify a File Hash (Checksum) on Windows

Checking a downloaded file’s hash (checksum) allows verifying its integrity and ensuring that the file contents have not been modified. Administrators commonly use MD5/SHA256 checksum verification for downloaded OS distros and software installation images.

The idea behind a checksum is that a certain value (hash) is calculated for the original file using a specific hash function algorithm (usually MD5, SHA1, or SHA256), and users can then perform the same check on the file they have downloaded. By comparing these two hash values, you can verify that you have downloaded the original file. If the file hashes are different, it means that the file has been modified or corrupted.

To verify a file’s hash in Windows, use the built-in Get-FileHash PowerShell cmdlet or the certutil command.

Get-FileHash "F:\ISO\Windows_server_2025_EVAL_x64FRE_en-us.iso"

Get-FileHash PowerShell

After some time, the cmdlet returns the file’s checksum using the SHA-256 algorithm (by default). Calculating the hash sum can take some time depending on the file size. The -Algorithm attribute allows to switch to a different checksum algorithm.

  • SHA1
  • SHA256 (default) – the most popular hash algorithm with the lowest probability of collision (when two different files have the same checksum)
  • SHA384
  • SHA512
  • MD5 – the fastest but outdated hashing algorithm

Similarly, you can get the file’s hash using certutil.exe:

certutil -hashfile "F:\ISO\Windows_server_2025_EVAL_x64FRE_en-us.iso" SHA256

Use Certutil command to get file SHA256 hash

Where to get the original Microsoft/Windows ISO image checksums?

If you have a Microsoft account, you can find the Windows image ISO checksums at https://my.visualstudio.com/Downloads. It doesn’t require an active MSDN subscription. Image checksum information is available on the Product info tab.

Check official hash/checksums for Windows ISO images

The following third-party online database also contains a list of all of Microsoft’s original images and their hashes https://files.rg-adguard.net/search. In contrast to the Microsoft site, this website allows to search for ISO images by their hash values. Search the resulting hash to make sure that you have downloaded the original ISO image file.

files.rg-adguard.net - find official hash values for Microsoft ISO

The hash sum value is not case-sensitive.

To automate the process of checking the hash sum of the downloaded image against the original value, use the following PowerShell one-liner:

((get-filehash .\Windows_server_2025_EVAL_x64FRE_en-us.iso).hash) -eq "D0EF4502E350E3C6C53C15B1B3020D38A5DED011BF04998E950720AC8579B23D"

Compare filehash in Powershell

The command returns True if the file checksum matches the reference value.

0 comment
3
Facebook Twitter Google + Pinterest
previous post
Bridging Multiple Network Interfaces on Windows
next post
Send a WhatsApp Message from the CommandLine (Shell)

Related Reading

How to Cancel Windows Update Pending Restart Loop

May 6, 2025

View Windows Update History with PowerShell (CMD)

April 30, 2025

Change BIOS from Legacy to UEFI without Reinstalling...

April 21, 2025

Remove ‘Your License isn’t Genuine’ Banner in MS...

April 21, 2025

Uninstalling Windows Updates via CMD/PowerShell

April 18, 2025

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMware
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025
  • Load Drivers from WinPE or Recovery CMD

    March 26, 2025
  • How to Block Common (Weak) Passwords in Active Directory

    March 25, 2025
  • Fix: The referenced assembly could not be found error (0x80073701) on Windows

    March 17, 2025
  • Exclude a Specific User or Computer from Group Policy

    March 12, 2025
  • AD Domain Join: Computer Account Re-use Blocked

    March 11, 2025
  • How to Write Logs to the Windows Event Viewer from PowerShell/CMD

    March 3, 2025
  • How to Hide (Block) a Specific Windows Update

    February 25, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Delete Old User Profiles in Windows
  • Fix: Remote Desktop Licensing Mode is not Configured
  • How to Install Remote Server Administration Tools (RSAT) on Windows
  • How to Create UEFI Bootable USB Drive to Install Windows
  • Configuring User Profile Disks (UPD) on Windows Server RDS
  • Wi-Fi (Internet) Disconnects After Sleep or Hibernation on Windows 10/11
  • How to Allow Non-Admin User to Start/Stop Service in Windows
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top