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 | Customized action name displayed in the deployment actions Enter 1 to 128 characters. Do not start or end with a space. Use letters, digits, spaces, and these special characters: -_,;:./() |
Environment | Select a host cluster as the deployment object. |
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. |
Action Control | You can configure whether to enable this setting.
|
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 content
Configure parameters.
Figure 2 Settings
- View the result.Figure 3 Result


If you encounter any problem during deployment, see Solutions to Common Problems.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.

