SRXEnv
1.0.5
Provides the ScriptRunner PowerShell Host Environment Variable $SRXEnv for test
and development purposes.
The SRXEnv hashtable provides the following keys:
[string] ReportEmail: (3.10.4133.0)
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 ad
and development purposes.
The SRXEnv hashtable provides the following keys:
[string] ReportEmail: (3.10.4133.0)
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 ad
Provides the ScriptRunner PowerShell Host Environment Variable $SRXEnv for test
and development purposes.
The SRXEnv hashtable provides the following keys:
[string] ReportEmail: (3.10.4133.0)
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: (3.10.4133.0)
Recipient email addresses (comma separated list). Only the ResultMessage will be sent to this address.
[string] ResultHtml: (5.2.6155.0)
The ScriptRunner PowerShell host supports HTML results through the $SRXEnv.ResultHtml variable.
The HTML web page can then be easily retrieved from the ScriptRunner Portal, Apps and WebApps.
For example, you can use the ConvertTo-Html cmdlet to assign HTML to the ResultHTML variable.
There are new sample scripts in the Expl/Common folder of the ScriptRunner ScriptRepository that
show how to create the HTML in your scripts.
[ArrayList] ResultList: (4.0.4511.0)
A scripted query must specify this list of string values. The list is associated with
the corresponding action parameter.
[ArrayList] ResultList2: (4.0.4511.0)
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: (3.00.3670.0)
This message will show in the reports, and in the immediate result window of the Portal, Delegate and
Self-Service App.
[string] ResultObjectJSON: (4.1.4738.0)
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.
[string] SRXActionID: (6.2.577.0)
The ID of the started Action. (read-only)
[string] SRXCommandPath: (6.2.642.0)
Full filepath of the executed script file used by the started Action (similar
to the PowerShell $PSCommandPath auto-variable). (read-only)
[string] SRXDisplayName: (4.1.4738.0)
The name of the current action. (read-only)
[string] SRXFilterValue: (6.2.577.0)
In case of query execution, this key contains the current filter value
from the search filter form in the UI. (read-only)
[DateTime] SRXStarted: (4.1.4738.0)
The timestamp of the start of the script execution. (read-only)
[string] SRXStartedBy: (4.1.4738.0)
The user account that requested the execution of the script. (read-only)
[string] SRXStartedIP: (4.1.4738.0)
IP address of the client that sent the request to perform the script execution. (read-only)
[string] SRXStartedReason: (4.1.4738.0)
A reason message written by the user who started the Action. (read-only)
[string] SRXStartedVia: (4.1.4738.0)
The name of the application that started the execution of the script. (read-only)
The Cmdlet Reset-SRXEnvironment is used to reset the SRXEnv variable. (This Cmdlet is not available in the ScriptRunner PowerShell Host.)
Show more
and development purposes.
The SRXEnv hashtable provides the following keys:
[string] ReportEmail: (3.10.4133.0)
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: (3.10.4133.0)
Recipient email addresses (comma separated list). Only the ResultMessage will be sent to this address.
[string] ResultHtml: (5.2.6155.0)
The ScriptRunner PowerShell host supports HTML results through the $SRXEnv.ResultHtml variable.
The HTML web page can then be easily retrieved from the ScriptRunner Portal, Apps and WebApps.
For example, you can use the ConvertTo-Html cmdlet to assign HTML to the ResultHTML variable.
There are new sample scripts in the Expl/Common folder of the ScriptRunner ScriptRepository that
show how to create the HTML in your scripts.
[ArrayList] ResultList: (4.0.4511.0)
A scripted query must specify this list of string values. The list is associated with
the corresponding action parameter.
[ArrayList] ResultList2: (4.0.4511.0)
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: (3.00.3670.0)
This message will show in the reports, and in the immediate result window of the Portal, Delegate and
Self-Service App.
[string] ResultObjectJSON: (4.1.4738.0)
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.
[string] SRXActionID: (6.2.577.0)
The ID of the started Action. (read-only)
[string] SRXCommandPath: (6.2.642.0)
Full filepath of the executed script file used by the started Action (similar
to the PowerShell $PSCommandPath auto-variable). (read-only)
[string] SRXDisplayName: (4.1.4738.0)
The name of the current action. (read-only)
[string] SRXFilterValue: (6.2.577.0)
In case of query execution, this key contains the current filter value
from the search filter form in the UI. (read-only)
[DateTime] SRXStarted: (4.1.4738.0)
The timestamp of the start of the script execution. (read-only)
[string] SRXStartedBy: (4.1.4738.0)
The user account that requested the execution of the script. (read-only)
[string] SRXStartedIP: (4.1.4738.0)
IP address of the client that sent the request to perform the script execution. (read-only)
[string] SRXStartedReason: (4.1.4738.0)
A reason message written by the user who started the Action. (read-only)
[string] SRXStartedVia: (4.1.4738.0)
The name of the application that started the execution of the script. (read-only)
The Cmdlet Reset-SRXEnvironment is used to reset the SRXEnv variable. (This Cmdlet is not available in the ScriptRunner PowerShell Host.)
Minimum PowerShell version
5.1
Installation Options
Owners
Copyright
© 2015-2022 ScriptRunner Software GmbH. All rights reserved.
Package Details
Author(s)
- ScriptRunner
Tags
ScriptRunner Windows Linux MacOS
Functions
PSEditions
Dependencies
This module has no dependencies.
Release Notes
FileList
- SRXEnv.nuspec
- SRXEnv.psd1
- SRXEnv.psm1
Version History
Version | Downloads | Last updated |
---|---|---|
1.0.5 (current version) | 1,384 | 8/9/2022 |
1.0.4 | 270 | 3/18/2021 |
1.0.3 | 148 | 2/11/2020 |
1.0.2 | 116 | 8/14/2019 |
1.0.1 | 52 | 7/18/2019 |