After you install the Windows ADK 1093 and WinPE Add-on you can right away create a custom Windows PE media. Example of this is adding PowerShell support to Windows PE.

First we need to prepare a local copy of the Windows PE files.

From the Start Menu, launch the Deployment and Imaging Tools Environment as Administrator

type the following command to create a working copy of the Windows PE files in your local drive: copype amd64 C:\WinPE_amd64_PS

Confirm that the copying of the file is successful

Adding Windows PowerShell to Windows PE

See the rest of the DISM commands below to add PowerShell into the WinPE media.

Dism /Mount-Image /ImageFile:”C:\WinPE_amd64_PS\media\sources\boot.wim” /Index:1 /MountDir:”C:\WinPE_amd64_PS\mount”

Dism /Add-Package /Image:”C:\WinPE_amd64_PS\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_amd64_PS\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_amd64_PS\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_amd64_PS\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_amd64_PS\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_amd64_PS\mount” /PackagePath:”C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-DismCmdlets.cab”

Dism /Unmount-Image /MountDir:C:\WinPE_amd64_PS\mount /Commit

More info

For more WinPE customization, wisit the WinPE page: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-intro

Leave a Reply

Trending

Discover more from LABDEMO

Subscribe now to keep reading and get access to the full archive.

Continue reading