Adding PowerShell support to WinPE using MDT 2012 RC1

After my last post about adding PowerShell support to WINPE I installed the latest MDT build.

Adding PowerShell support to WINPE is much easier using MDT.

Download MDT from connect Join the beta

Once installed add or create a deployment share.

Right click on the share and click properties.

Go to the Windows PE tab then click the features tab.


Select the features you want to add, click apply.

Close all the properties. Right click on the deployment share and click on update deployment share.

Once the update is complete you can use the WINPE ISO that MDT created to run PowerShell.


When PE starts up press F8 and run PowerShell by simply typing PowerShell




Make a Powershell Windows PE ISO

Oh I’ve been waiting a long time for this. PowerShell within WinPE

I was really excited about this functionality mainly for deployments but with the new ADK Windows Assessment and Deployment Kit (ADK) for Windows® 8 Consumer Preview it is possible to create WinPE ISO files and UDF/USB drives with a fully functioning PowerShell V3 shell inside.

Follow these instructions to install PowerShell within PE

These instructions are for installing PowerShell only, it does not include any instructions for adding network drivers or additional PE configurations required for production environments

Download the adkadksetup.exe from here

Install the ADK to a location of your choice

Once installed open the deployment and imaging tools as an administrator

Create the WinPE files by running the command copype amd64 c:winpe_amd64

or for x86

copype x86 c:winpe_x86

Create a directory like c:mount

Mount the PE boot.wim by running the command

dism /mount-wim /wimfile:C:winpe_x86mediasourcesboot.wim /index:1 /mountdir:C:mount

or for X64

dism /mount-wim /wimfile:C:winpe_amd64mediasourcesboot.wim /index:1 /mountdir:C:mount

once mounted add the required packages from the location you installed the .. Assessment and Deployment KitWindows Preinstallation Environmentx86WinPE_OCs

or for X64

Assessment and Deployment KitWindows Preinstallation Environmentx64WinPE_OCs

Please note..For my testing, I added every package apart from the as this caused issues within PE.

You can add the packages by running the DISM command..

dism /image:c:mount /add-package /packagepath:"C:Program Files (x86)Windows Kits8.0Assessment and Deployment KitWindows Preinstallation"

Once you have added the packages, drivers ect you must unmount the file and commit the changes with DISM

dism /unmount-wim /mountdir:c:mount /commit

The last step is to create the WINPE bootable image. By using the MakeWinPEMedia file you can create a udf or iso file from the contents of the c:winpe_x86 or x64 directory.

makewinpemedia /iso c:winpe_x86 c:winPE_x86.iso


makewinpemedia /iso c:winpe_x64 c:winPE_x64.iso

For this demonstration I created an ISO to test on Hyper-V

Powershell runs when typing the command Powershell into the command prompt.

Powershell is running on V3 within the host and get-command shows 366 cmdlets