Running PowerShell Scripts
This action aims to run the PowerShell scripts in a specified path on a Windows host. The following figure shows the configuration page.
Parameter |
Description |
---|---|
Action Name |
Name of an action displayed in the deployment actions area. |
Environment |
Target environment. |
Running Mode |
Default and Background are available.
NOTE:
|
Script Path |
Path of the script on the target host. |
Running Parameters |
Before executing the script, set parameters. During script execution, the entered parameter values are loaded and used. |
Control Options |
|
How Do I Use PowerShell Script Execution Parameters?
- Use param($a,$b) at the beginning of the script to declare variables a and b.
- Use variables $a and $b in the script.
- When running the script, enter the values of variables a and b in the script running parameters and separate them with spaces.
Example:
The following figure shows the content of the hello.ps1 script. Set an environment variable to import a temporary value.
Figure 1 Script contentConfigure parameters.
Figure 2 Settings - View the result.
Figure 3 Result
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.