Sometimes you might want to use the Active Directory module in WinPE.

First you need to enable powershell support in your bootimage:

If you don’t have the AD-module on your computer install RSAT.

Mount the WIM and copy the following directories to your bootimage:


%windir%\SysWOW64\WindowsPowerShell\v1.0\Modules\ActiveDirectory (x64-image only)



%windir%\Microsoft.NET\assembly\GAC_64\Microsoft.ActiveDirectory.Management (x64-image Only)

%windir%\Microsoft.NET\assembly\GAC_64\Microsoft.ActiveDirectory.Management.Resources (x64-image Only)

%windir%\WinSxS\amd64_microsoft.activedir..anagement.resources_31bf3856ad364e35_6.3.9431.0_en-us_fb186ae865900ae8 (x64-image Only)



To be able to create folders in the WinSxS folder you need to take ownership of the WinSxS-folder and add rights to your user!

When it starts to ask you about all the folders inside, just press “Cancel”.

(only tested on PE4 and PE5)

Importing the module:

There you go!

You can now use the Active Directory module in PE-powershell!

I have collected all the files here: PowershellAdModuleFiles

You can extract these and paste all the folders in to %windir% (you must edit the rights for WinSxS first!)

This is probably not supported by Microsoft and it might destroy your PE-image! :)