Adding Windows PowerShell support to Windows PE For ARM64
1.Download and install the Windows Assessment and Deployment Kit (ADK) and matching WinPE add-on.
For ADK versions prior to Windows 10, WinPE is part of the ADK and isn't a separate add-on.
2.Start the Deployment and Imaging Tools Environment as an administrator.
3.Create a working copy of the Windows PE files:
copype amd64 C:\WinPE_ARM64_MountDir
See CopyPE command line options for more information.
4.Add WinPE PowerShell optional components
Now that you have a working set of files that includes a WinPE image, you can mount the image and add the WinPE optional components required to add PowerShell.
Use the following script to mount the Windows image, add the Windows PE optional components for Windows PowerShell, and to unmount the image.
5.Mount your WinPE image:
Dism /Mount-Image /ImageFile:"C:\WinPE_ARM64_MountDir\media\sources\boot.wim" /Index:1 /MountDir:"C:\WinPE_ARM64_MountDir\mount"
Add the required optional components to your image. The example below shows the components to add to an image with the en-US language. If your image has additional languages, also add the versions of the packages below for the other languages included in your image.
Dism /Add-Package /Image:"C:\WinPE_ARM64_MountDir\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-WMI.cab"
Dism /Add-Package /Image:"C:\WinPE_ARM64_MountDir\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-WMI_en-us.cab"
Dism /Add-Package /Image:"C:\WinPE_ARM64_MountDir\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-NetFX.cab"
Dism /Add-Package /Image:"C:\WinPE_ARM64_MountDir\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-NetFX_en-us.cab"
Dism /Add-Package /Image:"C:\WinPE_ARM64_MountDir\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-Scripting.cab"
Dism /Add-Package /Image:"C:\WinPE_ARM64_MountDir\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-Scripting_en-us.cab"
Dism /Add-Package /Image:"C:\WinPE_ARM64_MountDir\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-PowerShell.cab"
Dism /Add-Package /Image:"C:\WinPE_ARM64_MountDir\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-PowerShell_en-us.cab"
Dism /Add-Package /Image:"C:\WinPE_ARM64_MountDir\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-StorageWMI.cab"
Dism /Add-Package /Image:"C:\WinPE_ARM64_MountDir\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-StorageWMI_en-us.cab"
Dism /Add-Package /Image:"C:\WinPE_ARM64_MountDir\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-DismCmdlets.cab"
Dism /Add-Package /Image:"C:\WinPE_ARM64_MountDir\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-
DismCmdlets_en-us.cab"
6.Add the required optional components to your image
Need copy driver into C:\armdriver
Dism /Add-Driver /Image:"C:\WinPE_ARM64_MountDir\mount" /Driver: C:\armdriver /Recurse
Unmount your image, committing changes:
Dism /Unmount-Image /MountDir:C:\WinPE_ARM64_MountDir\mount /Commit
7.Install this version of Windows PE to a USB key or a ISO file
Now that you have a WinPE image that includes PowerShell, you can create bootable WinPE media.
- Insert a USB drive into your technician PC.
- Run MakeWinPEMedia to create a bootable USB key that includes your WinPE image:
Windows Command Prompt
MakeWinPEMedia /UFD C:\WinPE_ARM64_MountDir F:
MakeWinPEMedia /ISO C:\WinPE_ARM64_MountDir
C:\WinPE_ARM64_MountDir\WinPE_amd64.iso
Copy Boot.wim file
Copy C:\WinPE_ARM64_MountDir\media\sources\boot.wim C:\WinPE_amd64.wim