troubleshooting Question

Run a powershell on MDT Task Sequence

Avatar of wajhiuddin
wajhiuddin asked on
Powershell* MDT* Deployment Image Servicing and Management (DISM)
3 Comments1 Solution108 ViewsLast Modified:
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
ASKER CERTIFIED SOLUTION
David Johnson, CD
The More I know, the more I don't know
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros