Scripted Event Documentation - Microsoft Edge Chromium

Contributors tvanroo Download PDF of this page

Overview

NetApp VDS includes a library of pre-defined scripted events that can be used directly in VDS environments and/or duplicated and used as the building blocks for custom scripted events.

For this application, this article covers both the install and uninstall action. For each of these two actions, there is a summary of the script and an example of an activity (trigger) that can be applied to implement the script.

This script package installs/uninstalls Microsoft Edge Chromium using the Chocolatey package manager (https://chocolatey.org/) to do the deployment. Chocolatey is deployed by VDS when VMs are created but this script will also check and install Chocolatey as a prerequisite if it is missing.

Install Script

Suggested Add Script Settings for Install

Built-in scripted events such as this one are pre-populated, can’t be edited and don’t need to be created. These "Suggested Add Script Settings" are simply for reference. To learn how to link this script to an activity, jump to the Suggested Add Activity Settings section below.
  • Name: Enter InstallMicrosoftEdgeChromium

  • Include Script File: Select Yes

  • Script File: Select script file and upload (InstallMicrosoftEdgeChromium.ps1)

  • Execute With: Enter C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe

Add Script Dialog Window Screenshot

scriptlibrary.script.InstallMicrosoftEdgeChromium

Suggested Add Activity Settings for Install

This example activity will install this application when the app is added to the Workspace in the VDS interface. VDS Scripted Events offers many other types of activity triggers such as "Create Server" which could be used as an alternative to the "Application Install" Event Type. Using "Create Server" would simply run this app install against all newly created VMs in VDS. "Create Server" and other triggers are documented and can be explored here.
In order for a script in the repository to take any action, an activity must be created to associate that script with a selected trigger. In this case, the activity will link the existing script to the Application Install trigger. Once configured, the action of adding this application to a workspace (from the Workspace > Applications page in VDS) will trigger this script to install this application on all appropriate session hosts in the selected deployment.
To create an Activity and link this script to an action:
  1. Navigate to the Scripted Events section in VDS

  2. Under Activities click + Add Activity

  3. In the opened dialog window enter the following information:

    • Name: Enter InstallMicrosoftEdgeChromium

    • Description: Optionally enter a description

    • Deployment Select the desired deployment from dropdown

    • Script: Select InstallMicrosoftEdgeChromium from the dropdown

    • Arguments: Leave blank

    • Enabled checkbox: Check the box

    • Event Type: Select Application Install from dropdown

    • Application: Select Microsoft Edge Chromium from dropdown

    • Shortcut Path: Enter \\shortcuts\Microsoft Edge.lnk

Add Activity Dialog Window Screenshot

scriptlibrary.activity.InstallMicrosoftEdgeChromium

Uninstall Script

Suggested Add Script Settings for Uninstall

Built-in scripted events such as this one are pre-populated, can’t be edited and don’t need to be created. These "Suggested Add Script Settings" are simply for reference. To learn how to link this script to an activity, jump to the Suggested Add Activity Settings section below.
  • Name: Enter UninstallMicrosoftEdgeChromium

  • Include Script File: Select Yes

  • Script File: Select script file and upload (UninstallMicrosoftEdgeChromium.ps1)

  • Execute With: Enter C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe

Add Script Dialog Window Screenshot

scriptlibrary.script.UninstallMicrosoftEdgeChromium

Suggested Add Activity Settings for Uninstall

In order for a script in the repository to take any action, an activity must be created to associate that script with a selected trigger. In this case, the activity will link the existing script to the Application Install trigger. Once configured, the action of adding this application to a workspace (from the Workspace > Applications page in VDS) will trigger this script to install this application on all appropriate session hosts in the selected deployment.
To create an Activity and link this script to an action:
  1. Navigate to the Scripted Events section in VDS

  2. Under Activities click + Add Activity

  3. In the opened dialog window enter the following information:

    • Name: Enter UninstallMicrosoftEdgeChromium

    • Description: Optionally enter a description

    • Deployment Select the desired deployment from dropdown

    • Script: Select UninstallMicrosoftEdgeChromium from the dropdown

    • Arguments: Leave blank

    • Enabled checkbox: Check the box

    • Event Type: Select Application Uninstall from dropdown

    • Application: Select Microsoft Edge Chromium from dropdown

    • Shortcut Path: Enter \\shortcuts\Microsoft Edge.lnk

Add Activity Dialog Window Screenshot

scriptlibrary.activity.UninstallMicrosoftEdgeChromium