Scripted Event Documentation - AVD Screen Capture Protection

Contributors Download PDF of this page

Global Scripts 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/enable and uninstall/disable action.

Global Script Use

Built-in scripted events such as this one are pre-populated, checking the "global" filter checkbox will display them.

Global Scripted Events such as this one are read-only. They can be used as-is or the "Clone" function can be used to create a customer copy for editing and use.

The Clone button is found in the action menu on the Scripted Events page.

scriptlibrary.overview 2ccb2

AVD Screen Capture Protection overview

This script package enables/disables the native AVD feature screen capture protection by executing the (relevant) command with Powershell:

Enable:

reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v fEnableScreenCaptureProtection /t REG_DWORD /d 1

Disable:

reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v fEnableScreenCaptureProtection /f

Add activity dialog window screenshot

scriptlibrary.AVDScreenCaptureProtection 216a6

Add Manual activity

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 example activity runs when the VDS admin manually triggers the script.

VDS scripted events offers many other types of activity triggers such as Create Server which could be used as an alternative to the Manual event type. Using Create Server would simply execute this script on all newly created VMs in VDS. Create Server and other triggers are documented and can be explored here.

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: Name this activity

    • Description: Optionally enter a description

    • Deployment Select the desired deployment from dropdown

    • Script: Select the install (or uninstall) script from the dropdown. This could be the global script or customer script you’ve cloned and customized.

    • Arguments: Leave blank

    • Enabled checkbox: Check the box

    • Event Type: Select Manual from dropdown

    • Target Type: Select the Servers radio button

    • Managed Servers: Check the box for each VM that should receive this uninstall.