PowerShell On-Prem plugin

This plugin is one of two available for PowerShell. Make sure to choose the correct version depending on your requirements:

Currently only PowerShell v7 is supported for this plugin.

Run user-created PowerShell scripts on Relay Agents.

To add a data source click on the + next to Data Sources on the left-hand menu in SquaredUp. Search for the data source and click on it to open the Configure data source page.

Before you start

Create the PowerShell scripts

Your PowerShell scripts can serve two different functions:

Import script

In case you need to import new objects into SquaredUp, you need an import script. This script contains the definitions for objects and their links in the Knowledge Graph. There can only be one import script per PowerShell On-Prem data source.

You can add more PowerShell On-Prem data sources to SquaredUp if you want to use different import scripts, and they can all use the same folder.

Data Stream script

All other scripts are Data Stream scripts. Those scripts contain the different Data Streams you want to use when you are creating tiles for a dashboard.

Configuring and deploying an agent

If you have already created an agent in SquaredUp that you can use for this data source, you can skip this step and choose the agent group you want to use while Configuring the data source.

See one of the following, depending on your platform type:

Configuring the data source

  1. Display Name:
    Enter a name for your data source. This helps you to identify this data source in the list of your data sources.

  2. Agent Group:
    Select the Agent Group that contains the agent(s) you want to use.

  3. Scripts Directory:
    Enter the path to the directory where you store the PowerShell scripts on the machine you deployed the agent on.

    The path must be written as an absolute path, for example
    C:\Scripts\SquaredUpCloud
    or, if you are using a network share,
    \\fs01\Scripts\SquaredUpCloud

  4. Import Script:
    Optional. If you want to use a script for importing objects into SquaredUp, you can specify that script here by entering its full file name, for example
    get-objects.ps

    The import script must be stored in the same directory you defined above.

  5. Only allow signed scripts (Windows only):
    If you select this checkbox, no unsigned PowerShell scripts will be executed. This applies to all scripts run by the data source, not just the import script.
  6. Restrict access to this data source:
    You can enable this option if you only want certain users or groups to have access to the data source, or the permission to link it to new workspaces. See Access control for more information.

  7. Click Add. If you defined an import script, it will run shortly and the objects will subsequently appear in the Map in the new workspace.

Testing and troubleshooting

If you encounter an error, refer to the guidance provided below or contact [email protected] with as much detail as possible for assistance.

Why can’t I see my scripts listed in parameters when configuring a tile?

There is no validation on the script path you enter when setting up the Powershell On-Prem Data Source, ensure the provided path is valid and that any scripts are saved in *.ps1 format.

Why isn’t my script returning expected data?

We’d always recommend ensuring that any scripts will successfully run outside of SquaredUp in the first case, and that data is formatted and returned correctly. If everything looks okay, you may wish to review how the columns are being used in the shaping and columns tabs in the tile configuration.

Next steps

Data streams

The following data streams are installed with this plugin.

Writing a custom data stream (advanced users)

Optionally, you can choose to create your own custom data streams.

  1. Go to Settings > Advanced > Data Streams.
  2. Add a new Data Stream with the following settings:
    Display Name
    This name will be displayed when you are creating tiles on a dashboard and can pick Data Streams.
    Data source
    Choose the PowerShell On-Prem data source.
    Entry point
    You can either use a scope of objects (list scope) or not limit the scope to specific objects (no scope).
    If you use the list scope, the Data Stream will only be visible when creating a tile that has those objects in its scope. Which objects are included is defined by the matches parameter in the Data Stream JSON.

    You can use all parameters you used for defining vertices in the import script as criteria for which objects to include (e.g. a specific type of object).

  3. Enter the JSON for the Data Stream in the code box.

Was this article helpful?


Have more questions or facing an issue?