Powershell
Version: 3.0.0
Windows PowerShell is a Windows command-line shell designed especially for system administrators.
Enabling WinRM on remote host
Please follow the following documentation: https://pypi.org/project/pywinrm/
Connect Powershell with LogicHub
- Navigate to Automations > Integrations.
- Search for *Powershell.
- Click Details, then the + icon. Enter the required information in the following fields.
- Label: Enter a connection name.
- Reference Values: Define variables here to templatize integration connections and actions. For example, you can use https://www.{{hostname}}.com where, hostname is a variable defined in this input. For more information on how to add data, see 'Add Data' Input Type for Integrations.
- Verify SSL: Select option to verify connecting server's SSL certificate (Default is Verify SSL Certificate).
- Remote Agent: Run this integration using the LogicHub Remote Agent.
- Host: The host to run the script on.
- Credential Entry Type: Credential settings vary based on credential type.
- Username: The username used to connect to the host.
- Password: The password used to connect to the host.
- After you've entered all the details, click Connect.
Actions for Powershell
Execute Remote Script
Run Powershell script on the remote host.
Input Field
Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.
Input Name | Description | Required |
---|---|---|
Use Cred Variable | Use/Pass Credentials in the script. Usage: '$cred' in the script will be replaced with the current session's credentials (PSCredential). Useful in multi-hop remote execution. (Default is 'No'). | Required |
Script Column | The column name with the script to execute. The column-value can contain '$cred' wherever the current session's credentials (PSCredential) are required. | Required |
For field 'Script Column'
For running script in x86 powershell please explicitly provide the path of the powershell. For example: “C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe C:\Users\Administrator\Desktop\check.ps1”
Output
A JSON object containing multiple rows of result:
- has_error: True/False
- error: message/null
- result: helps execute the script on remote host to monitor the error and status.
{
"std_out": "",
"std_err": "",
"status_code": 0
}
Release Notes
v3.0.0
- Updated architecture to support IO via filesystemv2.0.8
- Added documentation link in the automation library.
Updated about 1 year ago