Avatar of wajhiuddin

asked on 

Run a powershell on MDT Task Sequence

I am running a powershell script on my MDT Task Sequance  which is just fpr a test
Script runs but it does not produce results because it doen't run in unrestrected mode
So I added anohter script with folloiwng command to run before my test script
 Set-ExecutionPolicy -ExecutionPolicy Unrestricted -force (It has to be run as admin but looks like Task Sequence is not running this command as an admin) and  my test script still run as a restricted mode.
 Again  Test script runs(it creartes a folder "Temp" which is suppose to be created ) but without result ?
 Please see my script which runs absolutely fine with unrestricted policy
 So the problem I have I can't have PowerShell run as unrestricted

Powershell* MDT* Deployment Image Servicing and Management (DISM)

Avatar of undefined
Last Comment
Jason Crawford

8/22/2022 - Mon