0

I'm trying to create simple task sequence in MDT. One of the points is run PowerShell script located not in %SCRIPTROOT% but on external server in the same LAN.

TS is always failed with this error: enter image description here

What I tried so far was create standard step: "Run PowerShell Script", and in that window just wrote full path of the script: enter image description here

Also I was try to create step for Command Line:

"C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy bypass -file \\MyServer\SomeFolder\SomeScript.ps1

So my question here is - how to proper create step to run PowerShell script stored on external server? I was looking on many web pages but don't find any clues.

I will be grateful for any tips.

MikeZetPL
  • 97
  • 5
  • Does the "Domain Computers" group has read permissions on the share ? – Christophe Feb 15 '23 at 18:53
  • I tested this by run manually this ps1 script from machine where deployment had failed and script was open. I think I have to find proper way to call this script from task sequence. BTW I have few apps written as silent install thru ps1 script and they are installing fine from the same network share, but I assume code for "Install Application" is different, than code for "Run PowerShell script" – MikeZetPL Feb 15 '23 at 19:27
  • My only workaround for this was create synchronization task between %SCRIPTROOT% dir and \\MyServer\ where ps1 files are. Then in MDT TaskSequence I defined powershell task to run from %SCRIPTROOT%. – MikeZetPL Feb 20 '23 at 17:43

0 Answers0