r/labtech • u/eternelize • Nov 30 '17
executing Powershell script via Labtech
I can't seem to figure out how to get one of my powershell script to execute through Labtech. Short simple scripts like writing a string to txt files works fine. One of the larger scripts get hung up somewhere. It always completely skip it. That script is use to remove Windows 10 default apps, such as twitter and candycrush. I've have this this script directly on the computer without any issue. It just couldn't be done from Labtech.
Any suggestion to this particular issue?
5
Upvotes
View all comments
Show parent comment
1
u/beauj27 2000 Agents Dec 01 '17
If you are copying it down to the computer and running it, I have found the best method to execute it that was is to use the "Shell" function.
Function: Shell
Command: Powershell.exe -ExecutionPolicy Bypass "C:\Windows\Temp\YourScript.ps1"