ScriptRunner must be installed on both cluster nodes. In the Cluster Manager, the cluster resources for the node resources and the shared disk must also be set up.
The URI for ScriptRunner Web Service and the Web Apps is provided externally by a resource with a client access point.
Detailed instructions for cluster installation can be obtained from ScriptRunner Support.
Customizable HTML reports
ScriptRunner provides detailed reporting on the execution of actions and thus the execution of PowerShell scripts. The previous reporting included the following information:
Meta information about the script execution
Result- or Error-Messages
PowerShell console output
With this information, the execution of the PowerShell scripts can be monitored and auditing can be ensured.
With the growing distribution of PowerShell, however, the demands on the content and presentation of result reports are also increasing. Especially evaluations and overviews should be highlighted here.
PowerShell itself offers the possibility to output results as HTML documents with the ConvertTo-Html function. Additionally, there are two popular modules, ReportHTMLand PSHTMLin the PowerShell gallery to create extensive graphical reports with PowerShell.
With version 2019R3, ScriptRunner now offers this functionality for delegation and automation.
In our video Heiko Brenn, product expert at ScriptRunner, gives you an overview of the new feature:
New use cases with HTML reports
The new function opens up new use cases for ScriptRunner:
Administrators benefit from more meaningful and clearer reports on script execution results. In particular, recurring analysis and reporting script runs on resource usage, permissions, configurations, etc. are examples.
Service desk users benefit from a clear and attractive presentation of results of executed actions.
Specialist users are now also moving more into focus. Specific analyses and evaluations for this group can be written with PowerShell (e.g. for the evaluation of distributed data in O365, teams, SharePoint, databases, etc.) and can be prepared in a comprehensive visual format. The processing of the data takes place in the background and the specialist user receives a link to the finished report.
PowerShell built-in ConvertTo-Html
The PowerShell itself provides a function for generating HTML reports. The presentation of the HTML can be controlled with an appropriate CSS stylesheet, for example to apply headers and footers, fonts and colors to all reports.
The corresponding output is generated in the PowerShell script. The following code snippet shows how to create the output and assign it to ScriptRunner via the system variable $SRXEnv.ResultHTML :
The flexibility of ScriptRunner allows the use of special HTML generator modules in addition to the standard ConvertTo-Html function. Among others, the following modules are recommended for this purpose:
Within our ActionPacks we will successively provide more reporting scripts or refer to such scripts in other GitHub repositories.
HTML reports in ScriptRunner
The use of HTML reports is supported starting with ScriptRunner version 2019R3. The following extensions are implemented for this purpose:
System Hashtable: SRXEnv.ResultHTML
Virtual directory on the IIS …/scriptrunner/reports. Each report gets its own GUID there
Standard CSS on
<li>Admin Web App: extended metadata in PowerShell reports with link to the report</li>
<li>Delegate and Self-Service Web App: enhanced dialog box with link to the HTML report that is displayed during action execution</li>
<li>Delegate Web App: extended overview with link to the HTML reports</li>
<p><strong>The HTML reports can be accessed in 5 ways:</strong></p>
<li>Link in the Admin Web App</li>
<li>Link in the Delegate Web App</li>
<li>Link in the dialog box of the Self-Service Web App</li>
<li>Sending the report from a ScriptRunner action</li>
<li>Sending the report from the script via <em>$SRXEnv.ReportEmail</em></li>
<h2>Additional input validations</h2>
<p>To increase usability and application breadth, ScriptRunner's support for data types and input validations has been enhanced.</p>
<p>The automatically generated input fields in the Web Apps now also support the input of controlled regular expressions. The validation information is generated from the PowerShell script and must be defined in the param block of the script.</p>
<h3>Multiline text input</h3>
<p>In some applications, longer text entries are required as input parameters. The new multi-line feature can be used for this purpose. The definition is done in the param block of the script.</p>
<p>In some applications, text entries should not be invisible on the screen, but should be displayed as a chain of dots. The new Hidden Text feature can be used for this. The definition is done in the param block of the script.</p>
<h3>Secure string type</h3>
<p>In some use cases it is useful to use the <em>SecureString</em> data type. In the externally visible application, it does not differ from the extended attribute <em>Hidden Text</em>. However, when used within the script, use appropriate cmdlets that support this data type or perform conversions.</p>
<h2>Extensions in _QUERY_ and _LIB_ scripts</h2>
<p>The reusability of code is always the focus of programming efforts. This also applies to PowerShell scripts.</p>
<p>From the application of PowerShell scripts, function code crystallizes practically at each of our customers, which is used in many scripts by copy & paste. This leads to extensive and hardly maintainable PowerShell code.</p>
<p>PowerShell functions are suitable to counter this problem. A PowerShell function can be used in any script as long as access to the function code is guaranteed.</p>
<p>ScriptRunner supports the use of PowerShell functions in multiple ways:</p>
<li>As a library callable function with the <em>_LIB_</em> tag in a main script</li>
<li>As a callable function of a library with the tag <em>_LIB_</em> in a query script</li>
<li>As a directly usable function in an action</li>
<li>As a cmdlet in a self-written PowerShell module</li>
<p>The functionality of a Script Library <em>_LIB_</em> is similar to a self-scripted PowerShell module, but without its overhead and without its inherent static.</p>
<p>A Script Library can contain a variety of functions. It is recommended that functions that are thematically close to each other be grouped together in a separate library. Make sure that a header and a param block exists within each function. This allows individual PowerShell functions in ScriptRunner to be used directly in an action.</p>
<p>To use PowerShell functions in a main script, the corresponding PowerShell option must be set in the action configuration panel, as shown in <em>Figure 3</em></p>
[caption id="attachment_15279" align="alignnone" width="857"]<a href="https://www.scriptrunner.com/en/blog/scriptrunner-2019r3/lib_in_action/" rel="attachment wp-att-15279"><img class="wp-image-15279 size-sesa_sb_content_1_1" src="https://www.scriptrunner.com/wp-content/uploads/2020/02/LIB_in_action-857x401.png" alt="Figure 3: Screenshot of the " width="857" height="401" srcset="https://www.scriptrunner.com/wp-content/uploads/2020/02/LIB_in_action-857x401.png 857w, https://www.scriptrunner.com/wp-content/uploads/2020/02/LIB_in_action-300x140.png 300w, https://www.scriptrunner.com/wp-content/uploads/2020/02/LIB_in_action-768x359.png 768w, https://www.scriptrunner.com/wp-content/uploads/2020/02/LIB_in_action-705x329.png 705w, https://www.scriptrunner.com/wp-content/uploads/2020/02/LIB_in_action-569x266.png 569w, https://www.scriptrunner.com/wp-content/uploads/2020/02/LIB_in_action-355x166.png 355w, https://www.scriptrunner.com/wp-content/uploads/2020/02/LIB_in_action-783x366.png 783w, https://www.scriptrunner.com/wp-content/uploads/2020/02/LIB_in_action-249x116.png 249w, https://www.scriptrunner.com/wp-content/uploads/2020/02/LIB_in_action-184x86.png 184w, https://www.scriptrunner.com/wp-content/uploads/2020/02/LIB_in_action-441x206.png 441w, https://www.scriptrunner.com/wp-content/uploads/2020/02/LIB_in_action-697x326.png 697w, https://www.scriptrunner.com/wp-content/uploads/2020/02/LIB_in_action-403x188.png 403w, https://www.scriptrunner.com/wp-content/uploads/2020/02/LIB_in_action-252x118.png 252w, https://www.scriptrunner.com/wp-content/uploads/2020/02/LIB_in_action-554x259.png 554w, https://www.scriptrunner.com/wp-content/uploads/2020/02/LIB_in_action-176x82.png 176w, https://www.scriptrunner.com/wp-content/uploads/2020/02/LIB_in_action-630x294.png 630w, https://www.scriptrunner.com/wp-content/uploads/2020/02/LIB_in_action-131x61.png 131w, https://www.scriptrunner.com/wp-content/uploads/2020/02/LIB_in_action-312x146.png 312w, https://www.scriptrunner.com/wp-content/uploads/2020/02/LIB_in_action-494x231.png 494w, https://www.scriptrunner.com/wp-content/uploads/2020/02/LIB_in_action-675x315.png 675w, https://www.scriptrunner.com/wp-content/uploads/2020/02/LIB_in_action.png 888w" sizes="(max-width: 857px) 100vw, 857px" /></a> Figure 3: The PowerShell execution option for preloading library scripts into the session of an action can be found in the configuration panel of the action[/caption]
<p>If individual functions of a specific library are to be used in a query script, this library can be selected in the query settings (see figure 4).</p>
[caption id="attachment_15286" align="alignnone" width="808"]<a href="https://www.scriptrunner.com/en/?attachment_id=15286"><img class="wp-image-15286 size-entry_with_sidebar" src="https://www.scriptrunner.com/wp-content/uploads/2020/02/LIB_in_query-808x321.png" alt="Figure 4: Screenshot of the " width="808" height="321" /></a> Figure 4: The script execution option for preloading library scripts into the session of a query can be found in the configuration panel of the query[/caption]
<p>If you want to use a PowerShell function from a library directly as an action, you can select the function in the main menu <em>Scripts | Cmdlets</em> and create a new action by clicking<em> + New Action</em> (as shown in figure 5).</p>
[caption id="attachment_15288" align="alignnone" width="753"]<a href="https://www.scriptrunner.com/en/blog/scriptrunner-2019r3/func_as_action/" rel="attachment wp-att-15288"><img class="wp-image-15288 size-entry_with_sidebar" src="https://www.scriptrunner.com/wp-content/uploads/2020/02/FUNC_as_action-753x321.png" alt="Figure 4: Screenshot of the " width="753" height="321" /></a> Figure 5: Create a new action based on a PowerShell function by selecting the according function and clicking "+ Create" in the toolbar[/caption]
<h2>Enhancements to the Web Service Connector</h2>
<p>The number of application scenarios of the <a href="https://www.scriptrunner.com/en/software/connectors/web-service-connector/">Web Service Connector</a> is constantly increasing for our customers. This is accompanied by new requirements for using Micro Service as a caller of ScriptRunner actions.</p>
<p>For a better understanding of the different deployment scenarios with ScriptRunner here is a short overview:</p>
<h3>System or application backend</h3>
<p>ScriptRunner is called via the connector by another backend system. Source systems can be central monitoring systems or application servers, such as workflow systems. Individual service accounts or groups can be configured to authenticate the call to the ScriptRunner server and to assign the actions.</p>
<h3>Client application or client computers</h3>
<p>Client applications or client computers can use the Web Service in ScriptRunner directly. Only groups in the Self-Service End User role can be used to authenticate the call on the ScriptRunner server and to assign the actions. The referenced AD groups can contain user accounts or machine accounts.</p>
<p>For reasons of scalability and reliability, micro services are becoming increasingly popular. In combination with ScriptRunner as automation platform for PowerShell, new possibilities for the use of scripts arise. Therefore, the possibility of using Micro Services/Kubernetes as a calling source system for ScriptRunner was introduced (see figure 6). <strong>A separate license is required for this.</strong></p>
[caption id="attachment_15290" align="alignnone" width="857"]<a href="https://www.scriptrunner.com/en/blog/scriptrunner-2019r3/microservices/" rel="attachment wp-att-15290"><img class="wp-image-15290 size-sesa_sb_content_1_1" src="https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices-857x394.png" alt="Figure 5: A screenshot of the " width="857" height="394" srcset="https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices-857x394.png 857w, https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices-300x138.png 300w, https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices-1030x474.png 1030w, https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices-768x353.png 768w, https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices-705x324.png 705w, https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices-569x262.png 569w, https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices-355x163.png 355w, https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices-783x360.png 783w, https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices-249x114.png 249w, https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices-890x409.png 890w, https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices-184x85.png 184w, https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices-441x203.png 441w, https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices-697x320.png 697w, https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices-954x439.png 954w, https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices-403x185.png 403w, https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices-252x116.png 252w, https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices-554x255.png 554w, https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices-176x81.png 176w, https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices-630x290.png 630w, https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices-131x60.png 131w, https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices-312x143.png 312w, https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices-494x227.png 494w, https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices-675x310.png 675w, https://www.scriptrunner.com/wp-content/uploads/2020/02/microservices.png 1157w" sizes="(max-width: 857px) 100vw, 857px" /></a> Figure 6: In order to use Micro Services/Kubernetes as a calling source system for ScriptRunner, the according option has to be selected in the Web Service Connector properties panel[/caption]
<h3>Authentication with Basic Auth</h3>
<p>Calls to ScriptRunner by third party systems are always authenticated. Authentication is performed by application roles in ScriptRunner. The application roles themselves are linked to AD groups or directly to AD accounts.
A number of systems, especially Web applications, do not support all modern authentication methods. Although obsolete, Basic Auth is still frequently used by these applications.</p>
<p>To use Basic Auth on the ScriptRunner Web Service Connector, it must be enabled for Basic Auth. You do this by using a cmdlet of the <em>ScriptRunnerSettings</em> module.</p>
<li><em>Set-AsrSTSOptions -AuthMode WINBasic -ON</em> enables Basic Auth for the connector. Username and password of the caller account must exist in AD.</li>
<li><em>Set-AsrSTSOptions -AuthMode WINBasic -BasicLocalAccounts 1 -ON</em> enables Basic Auth for the connector. Username and password must exist as local user on the ScriptRunner server.</li>
<h2>Further improvements and enhancements</h2>
<p>In addition to the major features mentioned above, improvements and enhancements have been made in many areas.</p>
<h3>Functions for license management</h3>
<p>The PowerShell module ScriptRunnerSettings has been extended with some functions for license management.</p>
<li>With <em>Get-AsrLicensedUser -UserType 'Self-Service Users' </em>you can now query the registered Self-Service User Accounts. If an account is not used for a longer period of time, the license is automatically released.</li>
<li>Locked accounts of administrators and service desk users can now be reactivated with a specifically requested key. A separate one-time key is required for each account. For example:</li>
<pre class="lang:powershell">Enable-AsrLicensedUser -ExactLicensedUserString 'asrmarion.mueller' -ActivationKey XXXX</pre>
<h3>Password Connector improvements for CyberArk and Thycotic</h3>
<li>The data formats for querying credential references for users and computer accounts have been expanded to include additional capabilities offered by CyberArk.</li>
<li>The Password Connector for Thycotic Secret Server now supports Thycotic Secret Server Cloud in addition to the on-prem variant.</li>
<h3>Customization features for the Admin Web App</h3>
<p>The adjustments to the own corporate CI already known from the Delegate Web App have been extended to the Admin Web App with this version. The adjustments are made in the same way as for the Delegate Web App in the directory
You can find more information about the customization in our manuals.
We are constantly expanding our existing ActionPacks with new sample scripts. In addition, we are adding new collections to them. The following ActionPacks have been added:
https://www.scriptrunner.com/wp-content/uploads/2021/03/citrixactionpack.jpg441441Heiko Brenn, Head of International Businesshttps://www.scriptrunner.com/wp-content/uploads/2018/05/ScriptRunner_Logo_RGB-300x45.pngHeiko Brenn, Head of International Business2021-03-11 13:02:162021-03-11 14:46:04ScriptRunner ActionPack for Citrix