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
- 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. - The ISO is validated and then mounted.
- 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. - The script validates that the mounted ISO directory and the
.\<version>
directory match before unmounting the image. - The ZIP file is created from the
.\<version>
directory. - 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
Parameter | Alias | Required | Default | Type | Description |
---|---|---|---|---|---|
-Version | True | String | The version of Windows to create a ZIP file for. | ||
-ISOOnly | False | False | Switch (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