SRXEnv

1.0.2

Provides the ScriptRunner PowerShell Host Environment Variable $SRXEnv for test and development purposes.

The SRXEnv hashtable provides the following keys:

[string]ReportEmail:
If you have an SMTP server available, the ScriptRunner service can send you email notifications containing execution reports, on error or on success.
Recipient email address (comma sepa
Provides the ScriptRunner PowerShell Host Environment Variable $SRXEnv for test and development purposes.

The SRXEnv hashtable provides the following keys:

[string]ReportEmail:
If you have an SMTP server available, the ScriptRunner service can send you email notifications containing execution reports, on error or on success.
Recipient email address (comma separated list). The full action report will be sent to this address.

[string]ResultEmail:
Recipient email addresses (comma separated list). Only the ResultMessage will be sent to this address.

[ArrayList]ResultList:
A scripted query must specify this list of string values. The list is associated with the corresponding action parameter.

[ArrayList]ResultList2:
A scripted query can specify this optional list of display names. The list appears as drop-down list for the associated action parameter.

[string]ResultMessage:
This message will show in the reports, and in the immediate result window of the Delegate and Self-Service App.

[string]ResultObjectJSON:
The script can now provide (simple) structured result data by writing a (small) JSON string to $SRXEnv.ResultObjectJSON.
ScriptRunner will provide this JSON string in the OutSerializedPSObjects report field, for post-processing by the caller of the Web Service Connector.

[DateTime]SRXStarted:
The timestamp of the start of the script execution. (readonly)

[string]SRXStartedBy:
The user account that requested the execution of the script. (readonly)

[string]SRXStartedIP:
IP address of the client that sent the request to perform the script execution. (readonly)

[string]SRXStartedVia:
Name of the application that started the execution of the script. (readonly)


The Cmdlet Reset-SRXEnvironment is used to reset the SRXEnv variable. (This Cmdlet is not available in the ScriptRunner PowerShell Host.)
Show more

Minimum PowerShell version

5.1

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name SRXEnv -RequiredVersion 1.0.2

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name SRXEnv -Version 1.0.2

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) 2019 ScriptRunner Software GmbH. All rights reserved.

Package Details

Author(s)

  • ScriptRunner

Tags

ScriptRunner Windows Linux MacOS

Functions

Reset-SRXEnvironment

PSEditions

Desktop Core

Dependencies

This module has no dependencies.

FileList

Version History

Version Downloads Last updated
1.0.5 317 8/9/2022
1.0.4 269 3/18/2021
1.0.3 147 2/11/2020
1.0.2 (current version) 115 8/14/2019
1.0.1 51 7/18/2019