Scripted Events

Contributors tvanroo Download PDF of this page

Overview

Scripted Events provides the advanced administrator with a mechanism to create custom automation for system maintenance, user alerts, group policy management, or other events. Scripts can be designated to run as an executable process with arguments, or can be used as arguments for a different executable program. This functionality allows for scripts to be combined and nested to support complex customization and integration needs.

A detailed example of scripted events in action is found in the Application Entitlement Guide.

Additionally, Scripted Events allows for the creation of automation that does not require a script to process, rather the automation flow is launched by a system trigger and executes an existing program or system utility with optional arguments.

Scripts Events contains both a repository of scripts and activities. Scripts contain the instructions on what to do while activities link the scripts with the appropriate trigger and target (when and where) for the script.

Repository

The Repository Tab shows a list of all scripts available to be deployed from within your VDS account. This is a custom repository that is shared by all administrators in your VDS instance. Access to Scripted Events can be managed on the VDS > Admins > Permissions page.

sub.Management.Scripted Events.scripted events 1ce76

Customer Filter

Each VDS administrator organization has a private library of scripts created and/or customized by their organization. These scripts are defined as Script Type "Customer." Customer scripts an be deleted and edited by any VDS administrator with appropriate admin permissions to the Scripted Events section.

Global Filter

NetApp also publishes and maintains a library of "Global" scripts that is the same across all VDS administrator organizations. These scripts are defined as Script type "Global." Global scripts can not be edited or deleted by any VDS administrator. Rather, Global scripts can be "Cloned" and the resulting script is a "Customer" script that can be edited and used.

Download Script

The ability to download the script file associated with a Scripted Event allows the VDS Administrator to review and edit the underlying script file prior to deployment. Running a script that you don’t fully understand is never advisable.

sub.Management.Scripted Events.scripted events 02a9b

Add Script

Clicking on the + Add Script button opens a new page for creating a script and saving it to the repository.

Management.Scripted Events.scripted events a53fa

The following fields need to be completed to create a new script:

  • Name

  • Include Script File

    • Yes - Allows for a script file (e.g. a .ps1 file) to be uploaded and executed by the "Execute With" executable.

    • No - Removes the "Script File" field (below) and simply executes the "Execute With" and "Arguments" command

  • Script File

    • If Include Script File = Yes this field is visible and allows for the upload of a script file.

  • Execute With

    • Defines the path of the executable that is used to execute the script file or the the command that is executed.

    • For example, to execute with PowerShell the "Execute With" value would be C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe

  • Arguments

    • Defines any additional arguments that are executed against the "Executes With" command.

    • VDS offers some context aware variables that can be used including:

      • %companycode% - Company code at runtime

      • %servername% - VM name at runtime

      • %samaccountname% - <username>.<companycode>

      • %applicationname% - Requested application name at runtime

      • %scriptname% - Script name at runtime

      • %username% - username@loginidentifier at runtime

  • Documentation URL

    • This field allows the writer of the script to link it to documentation found outside of VDS such as a Knowledge Base system used by the VDS admins' organization.

Edit Script

Clicking the name of a script in the repository opens a new page with details about the script and an action button to edit.

When editing a script the same fields are editable as documented above in the Add Script section.

On this script detail page, you can also delete the script and download any uploaded script file.

Management.Scripted Events.scripted events 3e756

Activities

Activities link a script from the repository to a Deployment, a subset of VMs and a trigger event.

Management.Scripted Events.scripted events f971c

Add Activity

Clicking on the + Add Activity button opens a new page for creating an Activity.

Management.Scripted Events.scripted events 02ef8

The following fields need to be completed to create a new activity:

  • Name

  • Description (Optional)

  • Deployment

  • Script

  • Arguments

  • Enabled checkbox

  • Event Settings

Activity Triggers

sub.Management.Scripted Events.scripted events cdfcd
  • Application Install

    • This is triggered when the VDS Admin clicks "+ Add…​" from the Workspace > Applications page.

    • This selection allows you to select an application from the Application Library and to pre-define the shortcut of the application.

    • Detailed instructions for this trigger are highlighted in the Install Adobe Reader DC script documentation.

  • Application Uninstall

    • This is triggered when the VDS Admin clicks "Actions > Uninstall" from the Workspace > Applications page.

    • This selection allows you to select an application from the Application Library and to pre-define the shortcut of the application.

    • Detailed instructions for this trigger are highlighted in the Uninstall Adobe Reader DC script documentation.

  • Clone Server

    • This is triggered when the Clone function is performed against an existing VM

  • Create Cache

    • This is triggered anytime a new VM is built by VDS for a provisioning collection cache

  • Create Client

    • This is triggered anytime a new Client organization is added to VDS

  • Create Server

    • This is triggered anytime a new VM is built by VDS

  • Create User

    • This is triggered anytime a new user is added via VDS

  • Delete User

    • This is triggered anytime a new user is deleted via VDS

  • Manual

    • This is triggered by a VDS admin manually from within the "Scripted Events > Activity" page

  • Manual Application Update

  • Scheduled

    • This is triggered when the defined date/time is reached

  • Start Server

    • This is triggered on a VM each time it boots up

Clicking on the Name opens a dialog box where the activity can be edited.