KScript saying that a Powershell is executed successfully, but nothing is changed.
I'm attempting to run a Powershell script across our network and I'm testing it out before I roll it out to all the computers.
I've got the script written up and if I run it from the machine that I'm testing it on it will work fine. If, however I run it through a KScript it will say that the script executed successfully but when I watch the machine I'm testing it on I get an extremely fast flash of a Powershell window with a red error message in it. I can't grab a screenshot of the error and I've tried adding a sleep to the end of the script to make it slow down so that I can see the message to no avail.
Ultimately KACE thinks that the script ran successfully, but none of the work that the script is supposed to do has been performed.
The file I'm running is a .ps1 file.
Our network is set up to only allow powershell scripts to run locally (hence the KACE distribution).
I have the file uploaded to the KScript and am using the $(KACE_DEPENDENCY_DIR) line to point to it. I believe this should allow the script to run locally.
I have the local system account running the file.
The script is set to run whether or not someone is logged in.
Our K1000 is version 6.0.101865 if that helps.
Let me know if you need more information.