Creating a Custom Script

You can create and import your own scripts that will completely integrate into the Security Controls environment. When creating a custom script there are a few basic guidelines you must follow, such as:

  • The script must contain metadata that uniquely identifies it and describes its functionality and input parameters
  • The script must be signed by an authority that is trusted by the machine that the console is running on
  • The script can use any number of variables and functions that are provided by Ivanti and that are designed for use with Security Controls

User scripts can be executed against individual machines and groups of machines in exactly the same manner as executing the scripts provided with Security Controls. Advantages to running scripts in Security Controls include:

  • Scripts execute against the machines and machine groups you have already defined in Security Controls
  • Use the machine and machine-group credentials you have already entered in Security Controls
  • Scripts execute in the background
  • Script execution can be run immediately or scheduled to run in the future
  • Scripts are executed in parallel against the target machines and usually complete in a fraction of the time that it would take to run them serially and you can control the level of parallelism
  • Script output is captured to files that you can review at your convenience
  • Status of script execution is displayed within Security Controls
  • You can open the result files directly from Security Controls
  • Your scripts can be parameterized, and different sets of parameters can be saved in ITScript Templates or provided when you start the script or schedule it for execution
  • Scripts can use the PowerShell remoting features, allowing the broadest set of capabilities provided by Windows PowerShell
  • Scripts can use PowerShell modules. Different scripts can import different versions of a given module.
  • Only scripts signed by authorities that you trust will be allowed to execute
  • Security Controls also provides a number of PowerShell variables and functions that help simplify many common operations.

Most PowerShell scripts can be used in Security Controls with only minor modifications. This section describes how to prepare your scripts and import them into Security Controls.