Preparation

After the successful installation, you can use this guide to perform your first tests.

Before you can test ScriptRunner for the first time, you need to register for the trial version or active your license key.
Follow the instructions in the Product Activation chapter.

To prepare ScriptRunner for the first tests, follow these steps:

  1. Start the Admin App using one of the options:
    1. (Desktop App) Open the installed Admin App.
    2. (Web App) Open the web browser and enter the following link:
      http://<fqdn-scriptrunner-server>/ScriptRunner/admin or
      https://<fqdn-scriptrunner-server>/ScriptRunner/admin
      Note: In the following, all tests are displayed with the web app.
  2. Log in with a user from the admin group you have defined.
  3. You are in the dashboard.

Add Two Values

The following action adds two predefined values.

Note: This script behaves identically to the console.

  1. Switch to the Actions section.
  2. Find the action to be executed; Local: Add two values.
  3. Click on the action.
  4. Click Run in the lower navigation bar.
  5. The wizard opens.
    1. Select Targets: Make sure that [LOCAL] Direct Service Execution is selected.
    2. Set Parameter Values: Select the values to add; $ValueA = Script, $ValueB = Runner.
    3. Confirm the selection with OK.
  6. The action is executed in the background.
  7. The green bar next to the action indicates that the action was executed successfully.
    Note: A red bar indicates that an error occurred during the execution of the action.
  8. Report / Display result: Click on the bar next to the action or on the ticker at the bottom right.
    1. The Result message contains the feedback of the action; Script + Runner = ScriptRunner.
      Note: If an error occurs, the error description will be displayed here.

      Result message

      Result message: Script + Runner = ScriptRunner

Get Process HTML

The following action lists all running background processes. The action also generates an HTML report.

  1. Switch to the Actions section.
  2. Find the action to be executed; Get Process HTML.
  3. Click on the action.
  4. Click Run on the lower toolbar.
  5. The wizard opens. Switch to the respective page of the wizard:
    1. Select Targets: Make sure that [LOCAL] Direct Service Execution is selected.
    2. Set Parameter Values: Specify the processes to be displayed.
      Note: Use the wildcard * or an empty field to search for all running processes.
    3. Confirm the entry with OK.
  6. The action is executed in the background.
  7. The green bar next to the action indicates that the action was executed successfully.
    Note: A red bar indicates that an error occurred during the execution of the action.
  8. Report / Display Result: Click on the bar next to the action or on the ticker at the bottom right.
    1. Under Result message you find the feedback of the action.
    2. By clicking on the link to HTML result, the result is opened in a new browser tab as an HTML report.

Get AD User Properties

In this action, the properties of an AD user are called.

Requirements for this test:

  • InstalledActive Directory Module.
  • At least one user with stored properties, for example, Name, Description, Office, E-mail, City, Job Title, Department, Company, and so on

Configuration of the Action

  1. Switch to the Actions section.
  2. Find the action to be executed; Get-ADUser Properties.
  3. Click on the action.
  4. Click on Details in the lower toolbar to display the dependent settings. These must be adapted to your environment:
    Note: To customize each setting, click on the respective item and then click Edit.
    Detailansicht

    Detail view: Get-ADUser Properties

    1. Target; ADC remote: Define a valid FQDN within your AD domain.
      Note: Execution on this target is performed remotely with the stored AD Admin credential.

      Target

      Configured target with stored FQDN

    2. Credential; AD Admin: Declare a valid user account for your environment.

      Credential

      Configured credential of the user Ani

    3. Script; EXPLActiveDirectoryUserGet-ADUserProperties.ps1: Within the script you can adjust the parameters to be queried.
      • Click on the first item in the detail list Get-ADUser Properties
      • Click on Edit in the lower toolbar
      • The wizard opens

        $Properties

        $Properties: Selection of properties

    4. Query; List of OUs from AD: Adjust the SearchBase according to your environment.

      SearchBase

      Configured SearchBase of the domain

    5. Query; List of USERs from AD: This is a cascading query, that is, the query gets the results to be displayed from the query List of OUs from AD and uses these to display the selection as a dropdown list.

Executing the action

You are still in the Details view.

  1. Click on the first element of the detail list Get-ADUser Properties.
  2. Click on Run in the lower toolbar.
  3. The wizard opens.
    1. $OUPath: Select an OU from the list.
    2. $Username: Select the relevant user from the query results set.
      Note: If your result set contains more than 500 values, the message “Too many hits – refine your selection filter. In this case, use the search field under $Username in combination with the magnifying glass to filter your results set directly from the back end.
    3. $Properties: Specify the elements of the search result.
    4. Click OK
  4. The action is executed in the background.
  5. The green bar next to the action indicates that the action has been executed successfully.
    Note: A red bar indicates that the action ran into an error.
  6. Report / Display result: Click on the green bar next to the action or on the ticker at the bottom right.
    1. Under Result message you will find the properties of the queried AD user.

      Result message

      Return of the result message

Parameter Validation

This action shows how parameter validation works in ScriptRunner. Based on data types and parameter attributes in the script’s parameter block, users can only select or specify allowed values. ScriptRunner automatically creates the desired input form for the validation

This action exemplifies the parameter validation, which is controlled by data types and parameter attributes. This ensures that the user can only specify valid values. The user interface is automatically generated using the parameter validation in the stored script.

Note: Invalid entries are framed in red. The action cannot be started until all the entries made are valid.

  1. Switch to the Actions section.
  2. Find the action to be performed; Validation possibilities.
  3. Click on the action.
  4. Click Run in the lower toolbar.
  5. The wizard will open.

    • $ValueA: Data type: byte; Parameter attribute: ValidateRange
      • Only values between 17 and 20 are valid
      • Is added with $ValueB and $ValueC

    • $ValueB: Data type: byte; Parameter attribute: ValidateRange
      • A value between 5 and 15 is expected
      • Is added with $ValueA and $ValueC

    • $ValueC: Data type: sbyte; Parameter attribute: ValidateSet,Mandatory
      • The red exclamation mark indicates that this is a mandatory parameter. The field must not remain empty.
      • Only one value (10, 0, -10) of the dropdown list can be selected
      • Is added with $ValueA and $ValueB

    • $Array: Data type: Array; Parameter attribute: ValidateRange
      • Input of several values is possible.
      • Values between 7 and 18 are expected
      • Input of the values must be separated by comma
      • Only the input of numbers is possible

    • $StringArray: Data type: string[]; Parameter attribute: ValidateSet
      • By holding the Ctrl-key a multiple selection of individual values is possible
      • By holding down the Shift-key, multiple selections can be made as a block

    • $Text: Data type: object; Parameter attribute: ValidateLength
      • An input of at least three characters up to a maximum of eight characters is possible

    • $Set: Data type: switch; parameter attribute:
      • Is a switch parameter
      • Is set to True by activation

    • $RegEx: Data type: string; parameter attribute: ValidatePattern
      • Regular expressions validate information as it is entered, e.g. e-mail, telephone number, credit card number, etc.
      • Action can only be executed if the input matches the configured pattern

    • $PSCred1: Data type: PSCredential; parameter attribute:
      • Choice of one of the credentials configured in ScriptRunner
      • For security reasons, the internal ScriptRunner key is displayed in the report

    • $PSCred2: Data type: PSCredential; parameter attribute:
      • Choice of one of the credentials configured in ScriptRunner
      • For security reasons the internal ScriptRunner key is displayed in the report

    • $MultilineText: Data type: string; parameter attribute:
      • With the parameter attribute “ASRDisplay(Multiline)” the size of the input field can be
        changed
        Note: This functionality is only guaranteed in our recommended web browsers
      • By default the field displays five lines

    • $Password: Data type: string; parameter attribute:
      • By clicking on the eye the password is displayed in plain text
      • The parameter attribute “ASRDisplay(Password)” ensures masked input

    • $Pin: Data type: SecureString; parameter attribute:
      • By clicking on the eye the password is displayed in plain text
      • With the data type SecureString the masked input is guaranteed

    • $DateTime: Data type: DateTime; parameter attribute:
      • A calendar control is displayed for selecting a date

For more information on parameter attributes, see our Knowledge Base.

Simulate Set AD User Properties

The following action simulates changes in the properties of a user.

Note: The action only simulates the change, the properties are not overwritten.

Requirements for this test:

Configuration of the Action

  1. Switch to the Actions section.
  2. Find the action to be executed; Simulate Set-ADUserPropertiesDemo.
  3. Click on the action.
  4. Click on Details in the lower toolbar to display the dependent settings. These must be adapted to your environment:
    Note: To customize each setting, click on the respective item and then click Edit.
    Detailansicht

    Detailed view: Simulate Set-ADUserPropertiesDemo

    1. Credential; AD Admin: Create a valid user account for your environment.
    2. Target; AD local: Make sure that a user with sufficient rights is stored.
      Note: Execution on this target is performed locally with the stored AD Admin credential.
    3. Parameters: Adapt the OU path to your environment before executing the action:
      1. Click on the first element of the detail list Simulate Set-ADUserPropertiesDemo
      2. On the lower toolbar, click Edit
      3. The wizard opens
        1. $OUPath: Define the OU path.
          $OUPath

          $OUPath: OU path, where to find the user Padme in the AD 

          Note: Enabling “Hide parameter from input form” will hide the $OUPath parameter when the action is executed.

        2. Confirm the entry with OK.
    4. Queries: The queries can be used unchanged.

Executing the action

You are still in the Details view.

  1. Click the first item in the Simulate Set-ADUserPropertiesDemo detail list.
  2. ClickRun in the lower toolbar.
  3. The wizard opens.
    1. Select Targets: Make sure that [LOCAL] AD local is selected.
    2. Set Parameter Values:Adjust the fields according to your requirements:
      • $Username: Select the relevant user from the query results set.
        Note: If your result set contains more than 500 values, the message “Too many hits – refine your selection filter” is displayed. In this case, use the search field under $Username in combination with the magnifying glass to filter your results set directly from the back end.
      • Other properties: Adjust the properties according to your requirements.
        Empty fields are not overwritten.
      • $Simulate:Attention! Make sure that the check mark is set.
        Otherwise, the set properties will be overwritten.
    3. Confirm the entry with OK.
  4. The action is executed in the background.
  5. The green bar next to the action indicates that the action has been executed successfully.
    Note: A red bar indicates that an error occurred during the execution of the action.
  6. Report / Display result: Click on the bar next to the action or on the ticker at the bottom right.
    1. Under Parameter values the changed / set properties are listed.

      Parameter values

      Changed parameters of the AD user Padme

Suggest Edit