There are times when you would want to use Powershell or run a Powershell Script in MDT WinPE. Powershell support is available but is not enabled by default. This is how you enable it.
Launch Deployment Workbench, Open Properties of your Deployment Share and Click on Windows PE tab. Choose Platform x86 from the drop down. Select Features tab.
Enable .NET Framework and Windows Powershell
Choose Platform x64 from the drop down. Select Features tab and Enable .NET Framework and Windows Powershell. Click Apply.
Switch to the General tab and Ensure that you Enable the check box for both x86 and x64 in the Platform Supported Section and then click OK.
Next right click on your deployment share and click on update deployment share and completely regenerate the Boot Images and click Finish when done.
Boot off the new WinPE ISO, Press F8 to launch command prompt. Run powershell.exe to launch powershell prompt.