Script Package


 

Sapphire IMS allows you to execute scripts as part of IT Automation on a target machine. Apart from the default scripts provided, you can execute custom scripts as shown below.

Script Package Configuration

1. Click the 'Settings' tab. In the 'Software Management' section, click' Package and Policy Management'.

2. Click 'Script Package' to view the list of predefined scripts

3. Click 'Create Package' to create a new script package

 

script_pkg_confign.gif

 

  Sr. No

Field Name

Description

     1

Script Type

Select the script type. For Batch package installation, select Batch, for VB script package installation select  VB Script and for BASH package installation select BASH.

 

     2

File Type

If you select the Zip/Tar/Tar.gz/Gz file type, then select the Zip or Tar or Tar.gz or Gz option and place all the related executable and non executable files in a single folder and zip/tar that folder in name of the executable file itself.
While creating a Script Package, if you compress the package folder with Windows Native Compression then Agent can not unzip. So , you have to use a compression utility like WinZIP/WinRAR/7Zip etc. but the output file name should be in .zip format.

 

     3

Agent

Select Agent option to execute the script file on the agent.

 

     4

Package Name

Enter a meaningful package name for the executable file package

 

     5

File/Location

Specifies the location where the package resides .If the package is in remote location then select the correct credentials profile to connect to the remote host and then specify the path of the shared location. Attach the user profile for connecting the target host if required.

For Agent and BASH package installation, please upload the file to be executed

 

     6

Parameters

Specify the parameters if  required for script execution

     7

Run

Enter the name of the executable to be executed. If the File Type is Zip or Tar or Tar.gz or Gz then, mention the name of executable present inside the Zip or Tar or Tar.gz or Gz which has to be executed

 

     8

Execution Timeout (in minutes)

Enter the time limit for the file to be executed

 

Enable Redirection

Check the box to enable redirection to a target file

     9

Redirection Filename

Enter the Redirection Filename. This is a file which contains the redirection from the  script file.

    10

Redirection Pattern Condition

Redirection Pattern

Select the Redirection Pattern condition from the options provided

Enter the Redirection Pattern string. This pattern has to match the Redirection Pattern Condition in the Redirection File. In the above example, the keyword 'success' has to be present in the redirected file 'redirection.txt'

 

    11

Comment

Enter any comments related to the script file execution

 

Execute Custom Script/Exe

1.       Click IT Automation, Automation Tasks, Script Execution and click Execute Custom script

2.       Select Criteria as Node Level from the drop down

 

select_host.gif

 

3.       Click Show All, select host names and click Add

4.       Click Next

5.       Select script to be executed and click Next

6.       Click Skip if there are no scripts to be executed on SSH collected machines or select the hosts on which the script has to be executed and select the package to be installed

7.       Select the Schedule configuration, enter configuration name and click Save

8.       Click IT Automation, Automation Tasks, and Automation Task Status tab to view the status of the scheduled script execution.

 

Note: SapphireIMS is shipped with a list of in-built script packages, which are listed below

1. Check Disk: CheckDisk.vbs

   This script does an unconditional chkdsk against the specified volume. The Parameters field requires the logical volume name including colon(:) to be entered. Example:C: Specifying ALL will perform check disk against all the available logical volumes in a machine.       

2. Set Password Age: SetPasswordExpiryAge.vbs

This script is used to set the maximum password expiry days. The Parameters field requires the password age (in days) to be entered. Example:45

3. Disable java updates: DisableJavaUpdate.vbs

Java has a nifty autoupdate feature that is turned on by default. But,if we want to control the version(s) running in our network rather than ceding that control to Java.com we have to disable

java updates by using this default (Disable java Updates) package

4. Disable Flash Update: DisableFlashUpdate.bat

Flash player can automatically check for updates to help protect our computer but these flash updates consume data and update unnecessary patches. The package "disable flash update" is used to disable the flash updates in the machine

5. Firewall Program: addprogram.vbs

When we add a program to the list of allowed programs in a firewall we allow a particular program to send information to or from our computer through the firewall. Allowing a program to

communicate through a firewall (sometimes called unblocking) is  like opening a tiny door in the firewall. Each time we allow a program to communicate through a firewall, our computer becomes a bit less secure. The more allowed programs our firewall has, the more opportunities there are for hackers  or malicious software to use one of those openings to spread a  worm, access our files, or use our computer to spread malicious software to others. This package is used to add program to firewall exception program list.

6. Firewall port: addPort.vbs

If Windows Firewall is blocking a program and we want to allow that program to communicate through the firewall, we can usually do that by selecting the program in the list of allowed programs (also called the exceptions list) in Windows Firewall. However, if the program isn't listed, we might need to open a port.  For example, to play a multiplayer game with friends online, we might  need to open a port for the game so that the firewall allows the game

information to reach our computer. This package is used to add that firewall port.

7. Install Ultra VNC: UltraVNC_1196_x86.zip

Ultra VNC is a powerful, easy to use and free - remote pc access softwares that can display the screen of another computer (via internet or network)  on our own screen. The program allows us to use our mouse and keyboard to control the other PC remotely. This package is used to install ultar vnc package.