Question: mdt how to run powershell script?
Answer: In the Command line 2 field enter powershell.exe -file "%ScriptRoot%\file-name. ps1" . In the Start in 3 field indicate %ScriptRoot% then validate by pressing the Apply button 4 and OK 5. The next time you deploy with this task sequence, the PowerShell script will be executed.