Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Sometimes you might want to use the Active Directory module in WinPE.
First you need to enable powershell support in your bootimage:
http://sysadmins.no/wp-content/uploads/2014/04/PEPowershell.png
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%\System32\WindowsPowerShell\v1.0\Modules\ActiveDirectory
%windir%\SysWOW64\WindowsPowerShell\v1.0\Modules\ActiveDirectory (x64-image only)
%windir%\Microsoft.NET\assembly\GAC_32\Microsoft.ActiveDirectory.Management
%windir%\Microsoft.NET\assembly\GAC_32\Microsoft.ActiveDirectory.Management.Resources
%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)
%windir%\WinSxS\x86_microsoft.activedirectory.management_31bf3856ad364e35_6.3.9431.0_none_b85eb2e785c286ef
%windir%\WinSxS\msil_microsoft-windows-d..ivecenter.resources_31bf3856ad364e35_6.3.9431.0_en-us_38f21d039944539f
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:
http://sysadmins.no/wp-content/uploads/2014/04/PSadModule.png
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!)
DISCLAIMER!:
This is probably not supported by Microsoft and it might destroy your PE-image! :)