If you were to run the script manually as the LocalSystem account does it still work? When a Provisioning action kicks it off, it will do so as LocalSystem unless you are using a Distribute Software action and the package is setup to use a different user.
I will open a command prompt under LocalSystem and test. It is a distribution package and set to use LocalSystem.
Running the script manually works without error. Tried deploying provisioning template to machine and again, LANDesk says it was successful but it didn't run. I have been reading something about Powershell scripts need elevation to run properly - could this be the cause of it not working?
Quite likely -- there's a "Windows Actions Package" which usually bypasses the regular PowerShell policy.
You can test things out by setting your powershell policy to be unrestricted (on a test device) just to see whether it's your execution policy that's causing you grief (again - on a test device). Just as a simple "yes / no" poke to see if you're looking in the right area.
One of the ways (that should work) of bypassing your default / set execution policy is described here:
Hope that helps .
If memory serves correctly, powershell cannot be run from LocalSystem or the default administrator. I haven't played with the Windows Action Packages much, but from my experience, creating a package of a PS script wrapped in a batch file that sets the execution policy lower, and having it run as a service account that has local admin privileges on the machine, results in success most of the time. It's still pretty spotty.