We help IT Professionals succeed at work.
Get Started

Run a powershell on MDT Task Sequence

106 Views
Last Modified: 2017-12-05
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
 Thanks
īƒ†
ProtTest.ps1.txt
Comment
Watch Question
The More I know, the more I don't know
CERTIFIED EXPERT
Distinguished Expert 2020
Commented:
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE