This article explains how to add the PowerShell module to WinPE environments. The main steps are:
Download the ISO of a WinPE environment.
- Extract it using 7zip.
- Type the following commands:
md "c:\mount"
dism /mount-image /imagefile:"ExtractedIsoPath\WINPE_ADK_10_64_20170123_140241\SOURCES\boot.wim" /index:1 /mountdir:c:\Mount
Dism /Add-Package /Image:"c:\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-WMI.cab"
Dism /Add-Package /Image:"c:\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-NetFX.cab"
Dism /Add-Package /Image:"c:\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-Scripting.cab"
Dism /Add-Package /Image:"c:\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-PowerShell.cab"
Dism /Add-Package /Image:"c:\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-DismCmdlets.cab"
Dism /Add-Package /Image:"c:\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-SecureBootCmdlets.cab"
Dism /Add-Package /Image:"c:\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-StorageWMI.cab"
dism /unmount-image /mountdir:c:\mount /commit
- Add KBE Manipulator, upload the WIM file from “ExtractedIsoPath\WINPE_ADK_10_64_20170123_140241\SOURCES\boot.wim”.
0 Comments