PowerShell Engine module in Bridge | Qntrl | Bridge | Online Help

PowerShell Engine

PowerShell Engine

In Bridge, the PowerShell Engine module is used to perform actions in any Windows machines in the client's network using PowerShell script.

Prerequisite
While creating Credentials, select the type Powershell and provide the User Name and Password of the machine where the Powershell script has to be executed. Click here to learn how to create a credential.

The following section explains the tasks associated with the PowerShell Engine module and the request data for performing  tasks using Bridge.
To perform tasks using the PowerShell engine module requires stable network connectivity between the Windows machines.
Common keys in the Request data,
Keys
Description
  task_details
  A JSON object that contains the details of the task.
  activity_name
 Name of the activity performed in the PowerShell Engine module.
  exec_path
  (optional)
 Executable path of the installed PowerShell in the remote Windows machine.
  host_ip
 Address of the Windows machine where the activity has to be performed.
  credential
 A JSON object that contains credentials of the machine in which the PowerShell script has to       be executed.
  name
 Name of the machine credential.
  task_name
 A system-defined name for the respective modules. 'pwsh_task' is the task name for         PowerShell Engine.

PowerShell Engine

This task is used to execute an attached PowerShell script file on the remote Windows machine.

Request data  

{
"task_details": {
"activity_name": "start_service",
"exec_path": "<PATH OF EXECUTABLE FILE>",
"host_ip": "<HOST_NAME>",
"script_name": "<name of the script file>"
},
"credential": {
"name": "<CREDENTIAL_NAME>"
},
"task_name": "pwsh_task"
}
where,
script_name the name of the script file to be executed in a Windows machine.

Install WindowsApp

This task allows users to install apps on Windows machines using PowerShell.


Request data  

{
"task_details": {
"activity_name": "install_app",
"exec_path": "<PATH OF EXECUTABLE FILE>",
"host_ip": "<HOST_NAME>",
"file_path": "<PATH FOR THE APP TO BE INSTALLED>",
"msi_file_name": "<NAME OF THE MSI FILE>"
},
"credential": {
"name": "<CREDENTIAL_NAME>"
},
"task_name": "pwsh_task"
}
where,
file_path - msi file path for the app to be installed on the Windows machine.
msi_file_name - msi file name of the app to be installed.

Uninstall WindowsApp

An existing app can be uninstalled from the Windows machine using this task.


Request data  

{
"task_details": {
"activity_name": "uninstall_app",
"exec_path": "<PATH OF EXECUTABLE FILE>",
"host_ip": "<HOST_NAME>",
"app_name": "<APPLICATION_NAME>"
},
"credential": {
"name": "<CREDENTIAL_NAME>"
},
"task_name": "pwsh_task"
}
where,
app_name the name of the app to be uninstalled from the Windows machine.

Start Service

The task helps to start a service in the backend Windows server.

Request data  

{
"task_details": {
"activity_name": "start_service",
"exec_path": "<PATH OF EXECUTABLE FILE>",
"host_ip": "<HOST_NAME>",
"service_name": "<NAME OF THE SERVICE>"
},
"credential": {
"name": "<CREDENTIAL_NAME>"
},
"task_name": "pwsh_task"
}
where,
service_name - the name of the service that has to be initiated in the Windows machine.

Stop Service

A service running in the backend Windows server can be stopped with this task.


Request data  

{
"task_details": {
"activity_name": "stop_service",
"exec_path": "<PATH OF EXECUTABLE FILE>",
"host_ip": "<HOST_NAME>",
"service_name": "<NAME OF THE SERVICE>"
},
"credential": {
"name": "<CREDENTIAL_NAME>"
},
"task_name": "pwsh_task"
}
where,
service_name - the name of the service that has to be stopped in the Windows machine.

Restart WindowsServer

This task helps to restart a remote Windows machine using PowerShell.


Request data  

{
      "task_details": {
            "activity_name": "restart_server",
            "exec_path": "<PATH OF EXECUTABLE FILE>",
            "host_ip": "<HOST_NAME>"
      },
      "credential": {
            "name": "<CREDENTIAL_NAME>"
      },
      "task_name": "pwsh_task"
}
 The restart task can be performed only when no users are logged in. If any users are logged in, the restart cannot be performed. 



    • Related Articles

    • PowerShell Task Engine

      These states are used to perform any actions in the Windows machines of a private network using PowerShell commands. There are six states available in the PowerShell Task Engine for performing different operations. PowerShell Engine Install ...
    • SSH Engine

      SSH Engine state is configured to connect to a client's machine or network and remotely execute commands or scripts on the client's Linux/UNIX operating system. Prerequisite Bridge must be installed and should be active. Learn how to install and ...
    • Task Engine

      Circuit's Task Engine state is used to connect with other applications and access APIs from a closed space. To retrieve data from a private network, the required API must be accessed from the local machine's network for the required conditions. ...
    • Task Engine

      In Qntrl, while public APIs can be configured and executed directly through Webhooks, the client's internal APIs that are exposed only to the local network can be executed using the Task Engine module in Bridge. The Task Engine configured in Bridge ...
    • SSH Engine

      SSH Engine module in Bridge is used to perform actions in the client network/client's machine by executing a command/script in Linux/UNIX OS. Prerequisite While creating credentials for SSH Engine, choose the Credential type as SSH. Click here to ...

    You are currently viewing the help articles of Qntrl 3.0. If you are still using our older version and require guidance with it, Click here.