Deploying ps1 with k1000 vs 2000 in 3.7
Im attempting to run a powershell script from the k1000 and have been unsuccessful I have tried all the tricks listed in the forums. Wondering if it can be deployed from 2000 as a task without needing to install the OS. I have set the restriction policy to unrestricted the files land but the script never runs. Thanks for any answers you can provide.
2 Comments
[ + ] Show comments
Answers (2)
Answer Summary:
Please log in to answer
Posted by:
rileyz
8 years ago
What's your command to run the PowerShell script?
Normally the Execution Policy is set to restricted, this means no scripts will run. The command I use to execute PowerShell scripts on a vanilla system (with Execution Policy Restricted) is below. This means you can run script and not modify the execution policy, which I recommended. You still need administrative privileges of course.
powershell.exe -ExecutionPolicy Bypass -File NameOfYour.ps1
Note
- You will need to specify the full path to the script.
- Don't copy and paste from the internet, you might get caught out by quotes "
these are bad quotes: “
A better practice would be to change the Execution Policy to AllSigned, and sign your scripts, but you need a PKI setup for that, and that's £ to do it properly.
Posted by:
Lotus8
8 years ago
what happen if you launch manually the powershell script? does it work?
Can you describe better how you are trying to deploy it?
Regards,
Marco - StockTrader - StockTrader 8 years ago
https://support.software.dell.com/kb/148903 - Lotus8 8 years ago