Document toolboxDocument toolbox

Powershell

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 Devo SOAR

  1. Navigate to Automations > Integrations.

  2. Search for *Powershell.

  3. Click Details, then the + icon. Enter the required information in the following fields.

  4. Label: Enter a connection name.

  5. 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.

  6. Verify SSL: Select option to verify connecting server's SSL certificate (Default is Verify SSL Certificate).

  7. Remote Agent: Run this integration using the Devo SOAR Remote Agent.

  8. Host: The host to run the script on.

  9. Credential Entry Type: Credential settings vary based on credential type.

  10. Username: The username used to connect to the host.

  11. Password: The password used to connect to the host.

  12. 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

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.

{json}{ "std_out": "", "std_err": "", "status_code": 0 }

Release Notes

  • v3.0.0 - Updated architecture to support IO via filesystem

  • v2.0.8 - Added documentation link in the automation library.