Skip to the main content.

ScriptRunner Blog

Global Settings with the ScriptRunnerSettings PowerShell Module

The global configuration of the ScriptRunner Service Host was previously done via various settings in Setup, Admin App, LicenseViewer and manual settings on the system.

Post Featured Image

Apart from the distribution to different areas of ScriptRunner this had the disadvantage that every admin could make global settings with the Admin App and change them for all other users.

For this reason, all system-relevant global settings have been centralized in the PowerShell ScriptRunnerSettings module. The user of the module must have appropriate access and system rights for the operating system on the ScriptRunner Service Host. These rights are now independent of the membership in the role ScriptRunner Administrators.

The module maps the following functional areas for global settings:

Important common cmdlets to view the configuration of the ScriptRunner Service Host.

  • Get-ASRSettings: shows the most important settings of the ScriptRunner host.1-4
  • Get-ASRService: displays the status of the service on the ScriptRunner host.
  • Get-ASRLicense: reads the currently valid license information from the license file. This information can also be viewed via the Admin App under Settings.

Screenshot_License_status_english-1

4-1-1

The licensing functions are mapped with the following cmdlet:

  • Initialize-ASRLicense: is required once for the initial registration of a license. The license key must be a serial number key. For an offline license, a second offline enabling key is required, which was generated specifically for the customer’s machine ID4.
    During initialization, the company name and contact must also be entered in addition to the keys.
  • Update-ASRLicense: is used for all further license registrations, e.g. for the keys of connector licenses, license extensions and maintenance keys.
  • Get-ASRLicensedUser: creates a list of all accounts automatically registered by ScriptRunner.
  • Disable-ASRLicensedUser: deactivates an account automatically registered by ScriptRunner that is no longer actively used; a user license becomes free.
    An Internet connection is required once to activate the license. Depending on the network structure, a proxy configuration with or without login is required for the connection.
  • GetASRLicenseProxy: displays the proxy settings.
  • Set-ASRLicenseProxy: configures the proxy settings.
  • The central repository uses a Script Library directory on the ScriptRunner Service Host. This directory is located under LW:\\ProgramData\Appsphere\ScriptMgr by default.
  • Set-ASRSettings: changes the ScriptRunner Library directory, e.g. when using a checked out directory from Git, SVN, TFS or other code versioning systems.

Attention. This change affects the functionality of all already configured actions !

With Set-ASRSettings the archive function for the Check-Out/Check-In function of the ISE App can also be switched on or off.

With ScriptRunner policies (actions) both script and cmdlets can be executed directly instead of a script in a controlled way. If CmdLets are to be made available for direct use in actions instead of scripts, the cmdlets from the modules must be made accessible in ScriptRunner.

Screenshot_Library_status_english

  • Get-ASRPSModule: lists all PowerShell modules directly usable in ScriptRunner for actions.
  • Add-ASRPSModule: adds PowerShell modules to ScriptRunner for direct use in actions.
  • Remove-ASRPSModule: removes PowerShell modules for direct use in actions

ScriptRunner supports parallel writing of PowerShell reports including the corresponding metadata into an external SQL database. Connection settings are made using cmdlets. A valid SQL Connector license is required.

  • Get-ASRSQLConnect: displays the configured SQL connection string.
  • Set-ASRSQLConnect: configures the SQL Connection String. Explicit and implicit logon can be used. To this an administrative account can be assigned to the SQL Audit/Report Connector in the Admin App, which must have the rights to write in the database.

8-1-1

The ScriptRunner service on the host must be restarted if some global settings are changed. In addition, the service can be switched off for maintenance work.

  • Restart ASRService: Restarts the service on the ScriptRunner host. Cmdlet functions that require a restart after changing the settings also have this function as an integrated parameter function.
  • Stop-ASRService: Stops the service on the ScriptRunner host.
  • Start-ASRService: Starts the service on the ScriptRunner host.

Support in case of problems

If you should expect or have problems with the update, please contact support@scriptrunner.com. We will be glad to help you.

Related posts

2 min read

VMUG Webcast: Mastering VMware Management with PowerCLI

3 min read

Automate your spring cleaning with PowerShell

5 min read

Mastering PowerShell with Get-Help

About the author: