MDT Powershell Feature modification

Ed Reed 6 Reputation points
2022-08-31T18:39:28.823+00:00

I include the PowerShell feature in the WinPE deployment share properties, but I need to modify the powershell.exe.config of this feature. Specifically, I need to add this,

<runtime>
<loadFromRemoteSources enabled="true"/>
</runtime>

to the .config file, per this post https://stackoverflow.com/questions/18801440/powershell-load-dll-got-error-add-type-could-not-load-file-or-assembly-webdr . I've confirmed that this setting solves a problem in my PowerShell script while in WinPE. The trouble is, I don't know exactly how to change this in the Feature so that it gets added to my boot file automatically. Right now, I have to manually edit the .config file after I boot into WinPE.

A separate issue but similar is, it would be nice to be able to add a .cab file to the Features list to include the PowerShell Active Directory modules to the WinPE boot image. If there was a .cab file that could be added to the C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us directory, then adding the Active Directory modules could just be a feature in the list that could be enabled or disabled easily.

Microsoft Deployment Toolkit
Microsoft Deployment Toolkit
A collection of Microsoft tools and documentation for automating desktop and server deployment. Previously known as Microsoft Solution Accelerator for Business Desktop Deployment (BDD).
821 questions
{count} votes