A custom script can call any function defined by PowerShell or VBScript. PowerShell can also instantiate and invoke .NET Framework objects, and VBScript can instantiate and invoke COM objects, such as Scripting.FileSystemObject
. Both types of script can run command-line applications using the MIRunCommand
function.
After you save a custom script in MOVEit Automation, the script can be used in a process. Custom scripts are stored encrypted in the MOVEit Automation configuration file.
To
|
Do this
|
Create a custom script
|
- Click > > .
- Input a name in the Friendly Name field.
- Add a description (optional).
- Select the VBScript Script Type.
- Select a script template (optional)
- In the Script Source box, edit the script as needed.
- To save the new custom script, click .
For more information, see Add New Custom Script.
|
Import a custom script
|
- Click > > .
- Select the Script Type. The options are VBScript or PowerShell.
- Click .
- Locate the script and click .
- Edit the imported script in the Script Source box, if required.
- To save the imported script, click .
The original (external) script is not affected by changes you make to the script in Web Admin.
NOTE: If you have a custom script open in Web Admin, and you import an additional script, the source code of the new script overwrites the source code in the Script Source box. You do not receive a warning message.
|
Export a custom script
|
- Select an existing script or create a new script.
- On the script properties page, select from the drop-down list.
The script is exported as a VBScript (.vbs ) or PowerShell (.ps1 ) file using the friendly name as the filename.
For example: myscript.vbs or samplescript.sp1
|
Edit a custom script
|
- Select the existing script that you want to edit.
- On the script properties page, click .
- Edit the required fields in the Edit Script window.
- To save the script changes, click .
NOTE: If you change the friendly name of a script and save, that same script is saved with the new friendly name. To use an existing script as the starting point for a new script, see Use an existing custom script to create a new script in the last row of this table.
|
Edit a custom script in an external editor
|
- Select the existing script that you want to edit.
- On the script properties page, select from the drop-down list.
- Open and edit the exported script in an external editor.
- In MOVEit Automation Web Admin, select the script name and click .
- Click and select the edited file.
- To save the script changes, click .
The imported file overwrites the Script Source.
|
Create a new script using an existing custom script
|
- Select the existing script that you want to use to create a new script.
- On the script properties page, select in the drop-down list.
- Create a new custom script with a unique Friendly Name.
- Import the exported script.
- To save the script changes, click .
|