Is there a way to make powershell scripts run under the applications list so that when you install from the MDT image you can select which scripts you want to run?
I can run the scripts fine as scripts but every attempt I've tried the scripts will not execute.
This is how I am trying to do it, but they don't execute. (I link to the Script under the Install Applications under Task Sequence. So far I've come to conclude Microsoft does not allow PowerShell Scripts to work this way without some serious hacking around.
So after trying several ways and doing research this is what I have now:
I am trying this:
powershell -noexit "& "'\\SERVER.com\ImageDeploymentShare$\Scripts\script_tes_2t.ps1'
Working Directory is:
But I am getting this:
I saw something like this posted on technet but surely this is to the extreme?
Filename RunPowerShell.cmd Powershell -Command Set-ExecutionPolicy Unrestricted Powershell.exe -file "%~dp0%1" Powershell -Command Set-ExecutionPolicy AllSigned Filename App1.ps1 Dir Execute this with [fulle_Path_if_needed\]RunPowerShell.cmd App1.ps1