This article explains how to add the PowerShell module to WinPE environments. The main steps include:
Download the ISO of a WinPE environment
- Extract with 7zip
- Type the following commands:
md "c:\mount"
dism /mount-image /imagefile:"ExtractedWinPE_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 “ExtractedWinPE_ADK_10_64_20170123_140241\SOURCES\boot.wim”
0 Comments