User Stages

Create user stages to customize and save stages for use within bot creation. Once created the stages are available for reuse on the Neurons Bots editor, under Stages > User.

To create a User Stage

  1. Go to Main menu > Neurons Bots.
    The Neurons Bots homepage appears.
  2. Select the General Bots or Survey Bots tab.
  3. Select the Create bot or Create survey.
    The Create bot or Create Survey page appears.
  4. Select the bot trigger: Schedule or Custom action.
  5. Select the target type: Devices or People.
  6. Enter a Name for the bot. Optionally enter a brief description.
  7. Click Create.
    The Bots editor page appears.
    The new bot is saved as an inactive draft version.
  8. On the New bots editor page, select Manage user stages to display the User Stage Manager page.
  9. On the User Stage Manager page, click the Create drop-down and select the desired stage from the following:
    • PowerShell Query
    • PowerShell Action
    • Bash Action
    • Command Action
    • OSQuery
  10. On the User Stage Editor page, enter the Stage name. For example, Compress File/Folder.
  11. Optionally enter a description. The descriptive text displays when in the bot editor and Stage Information is selected from the Stage Settings panel. For example, This stage compresses source files from a specified path to a destination path to the specified compression level.
  12. Enter the script code.
    Example:
    Compress-Archive -path C:\logs\file.txt 
    -destinationpath C:\logs\file.zip 
    -compressionlevel Optimal

You can make this script more flexible by replacing some of the hard code with variables. This would allow elements to be customized when using the stage.
Example:
Compress-Archive -path __Path to Source File or Folder__
-destinationpath __Destination Path__
-compressionlevel __Compression level|options:Fastest,Optimal,No
Compression__

Select Ctrl + Space to insert an Options Variable or a Value Variable:

  • An Options Variable is displayed in the settings as a select drop-down, the options available will be the ones you enter into the script. In this example: Compression level options Fastest, Optimal, No Compression.
  • A Value Variable is displayed in the settings as a text box, with the label you enter in the script. In this example: Patch to Source File or Folder, Destination Path, and Compression level.

For this example the Stage Settings would look like this:

custom stage settings

  1. Complete the Stage Settings, the settings available depend on the type of user stage you are creating:
  1. Select Apply and Close to save the user stage.
    If you have made edits to an existing user stage, a new version is created. On saving, a dialog displays to warn that any bots using the user stage will need updating to use the latest version.

Actions

You can perform the following actions to any of the user stages:

  • Clone: Select a user stage, select Actions > Clone. The Clone Stage dialog displays. Enter a unique name and select Clone. A pop-up message displays to inform you the stage creation was successful. The cloned stage appears in the list for you to select and edit.
  • Delete: Select one or more user stages, select Actions > Delete. The Delete stages dialog displays. Select Delete to confirm deletion of the stage. This action cannot be undone and will deprecate the stage from any bot that uses it. Deprecated stages are indicated by a red border.

Related topics

Neurons Bots Stages