Check that checksum: Validate media files with PowerShell

When copying files from the Internet, especially ISO files, it is a best practice to validate the checksum to guarantee that the data was not changed in transit or even at the source. If the match provided by the vendor is the same that you have on your computer, then you are in an excellent place to start deploying software. Let us do a simple example. I will be using my MSDN website to download the Windows Server 2016. We are going to check the checksum of such file and the algorithm being used (sha1) -- and this is a way that you can validate media files.

I’ve created a simple PowerShell script to validate media files downloaded from the Internet. The script requires two parameters, which are filename and checksum, and by default, the script uses the SHA1 algorithm. We can change the algorithm using the -algorithm switch.

Here is an example of Windows Server 2016 where the checksum matches.

Here is an example of the same file when the checksum does not match.

You can download the script I used to validate media files from my GitHub account here.

Anderson Patricio

Anderson Patricio is a Canadian MVP in Cloud and Datacenter Management, and Office Server and Services, besides of the Microsoft Award he also holds a Solutions Master (MCSM) in Exchange, CISSP and several other certifications. Anderson contributes to the Microsoft Community with articles, tutorials, blog posts, twitter, forums and book reviews. He is a regular contributor here at Techgenix.com, MSExchange.org, ITPROCentral.com and Anderson Patricio.org (Portuguese).

Share
Published by
Anderson Patricio

Recent Posts

wpDiscuz WordPress plugin: Critical vulnerability found and patched

Users of the wpDiscuz interactive comment WordPress plugin should implement a new patch as soon…

19 hours ago

Data lifecycle management: Policies and procedures for security and compliance

With the amount of electronic information consistently growing, data lifecycle management is crucial for compliance…

24 hours ago

Deploy Windows from the cloud to on-premises hardware? Yes, you can

Wouldn’t it be nice if you could deploy Windows from the cloud while sipping an…

4 days ago

Blackbaud data breach after ransomware attack hits universities, nonprofits

Blackbaud, a cloud services provider focused on the education sector and nonprofits, suffered a data…

4 days ago

Sending email from Linux terminal: Efficient and powerful solution

Knowing how to send email from the Linux command line is important, especially when you…

5 days ago

Family Tree Maker genealogy software experiences data breach

A data breach affecting popular genealogy software Family Tree Maker has been discovered and patched,…

5 days ago