Can you try running: powershell.exe -nologo -noninteractive -noprofile -windowstyle hidden -ExecutionPolicy Bypass %YOURSCRIPTWITH PATH%.ps1
Mainly what you are looking for is -ExecutionPolicy Bypass but I added other switches I use as well.
Thanks for the quick responses!
Joe: That didn't work but maybe I used your advice wrong. Are you saying to put that command in the "Enter command line..." box that Steve posted the screenshot of? If yes, do I also make the .ps1 the main package?
Steve: I saw that post on here but it did not help. I'm calling my own parameters in that line which may be messing with the set-executionpolicy cmdlet.
The root of the problem still stands though. Why would LANDesk's deployment of a .ps1 either change the execution policy or cause the system to react and change it itself?
No I believe you used it right, the ps1 would be the main package because LDMS with use powershell because the package was created as a powershell in SWD. Issue: PowerShell Script Fails (Run From Source) is a doc of the same concept.
Are you using software distribution and provisioning, because in provisioning you can just use the Execute Commands and put the whole path of the script. Be sure in your distribution package the set the Script Options if you are using it to deploy it to x64.
After the package is deployed its supposed to reset the execution to what it was before it install, at least that has been my experience in the past, because its just using bypass. Also make sure you use the Powershell Security section if it is Signed. Note that if it self signed you will need to be sure its the cert is in the Trusted Root Certification Authorities cert section.
I setup a Certificate Authority and made some GPO edits and everything played nice in terms of the Execution Policy, Thanks for your help Joe!