Skip to main content

New-Win10Zip

Description

Downloads an ISO and creates a Windows 10 release ZIP file and hash for use in automatic deployments of Windows 10.

Requirements

  • PowerShell v5
  • Internet Connection

Usage

  1. If the target ISO file is not found on your system under C:\ESD, then the MediaCreationTool.bat repository is downloaded and used to pull the applicable ISO.
  2. The ISO is validated and then mounted.
  3. The entire contents of the ISO are copied to .\<version>, where . is the location of the script file and \<version> is the passed-in version parameter.
  4. The script validates that the mounted ISO directory and the .\<version> directory match before unmounting the image.
  5. The ZIP file is created from the .\<version> directory.
  6. An MD5 hash for the ZIP is generated, and the path to the ZIP file along with the hash is output to the -data.txt file.

Downloads a Windows 10 21H1 ISO and creates the applicable ZIP file and hash.

.\New-Win10Zip.ps1 -Version 21H1

Parameters

ParameterAliasRequiredDefaultTypeDescription
-VersionTrueStringThe version of Windows to create a ZIP file for.
-ISOOnlyFalseFalseSwitch (bool)Use this to only download the ISO for the target version. A ZIP file will not be created.

Output

Location of output for log, result, and error files.

.<version>.zip
.\New-Win10Zip-log.txt
.\New-Win10Zip-data.txt
.\New-Win10Zip-error.txt