Skip to the main content.

ScriptRunner Blog

Bulk Actions Made Easy with PowerShell and ScriptRunner

After the very successful introduction of our version 2016R1, the ScriptRunner team is now updating version R2 with a number of improvements and new features, e.g. how you can execute actions on multiple target systems simultaneously.

Post Featured Image

After the very successful introduction of our version 2016R1, the ScriptRunner team is now updating version R2 with a number of improvements and new features, e.g. how you can execute actions on multiple target systems simultaneously.

 
 
 

Parallel execution of actions on a large number of target systems

In the administration of larger IT environments, no matter whether they are available for one company or for many (e.g. service providers), there are always and regularly tasks that have to be executed on a large number of systems. This can be a regular query of the configuration to update a CMDB in Configuration Management or the collection of log files up to updating settings or providing files.

Due to the number of systems and the already very tight time windows, such processes cannot be carried out either during working hours or one after the other at night. Instead, it is necessary to carry out these activities in parallel in the shortest possible time. Here the Bulk Actions of ScriptRunner 2016R2 in conjunction with PowerShell can help.

A bulk action is characterized by the following features:

  • The same script is executed on all systems of the selected container.
  • The same administrative account is used for execution on all systems.
  • The Powershell options and remote session are the same for all systems.

These specifications mean a clear gain in execution on several levels:

  • Security: it is ensured that the runtime environment is identical when the script is executed on all systems.
  • Reproducibility: Errors only occur in systems that do not match the expected values.
  • Performance: the parallel execution of the scripts on the target systems reduces the necessary time for the complete execution of the task to the minimum possible.

Previously, multiple systems could be associated with a PowerShell action. This made it possible to create a limited parallelisation of the same actions on different systems. This functionality has now been significantly enhanced.

Creating target system containers and assigning systems to one or more containers considerably simplifies the configuration of actions. In addition to the target systems, a container configuration also contains the common configuration for the administrative account with which the script is to be executed on all target systems, as well as the settings for PowerShell Remoting and the remote PowerShell session in which the script will run.

Afterwards a bulk action can be created and executed in ScriptRunner. The procedure is similar to the one known from ScriptRunner. Instead of a target system, a target system container is now assigned in the action.

After the action has been executed, a report can be viewed from the container for each target system in reporting. In addition, there is a summary report in which a list of the target systems as well as the execution status of the action is noted in short form. This gives administrators a quick overview of the results of a bulk action.

Bulk actions in ScriptRunner are an important contribution to PowerShell automation in large environments.

 

Related posts

3 min read

ScriptRunner now available in the Microsoft Azure Marketplace

6 min read

Managing Microsoft Exchange with PowerShell

2 min read

VMUG Webcast: Mastering VMware Management with PowerCLI

About the author: