Skip to main content
Deploy by RMM

Deploy with Kaseya VSA 9

Upload the client's script and build an Agent Procedure that writes it to the computer and runs it with 64-bit PowerShell as System.

Written By The Lemhi Product Team

Last updated 10 days ago

For technicians on Kaseya VSA 9. VSA 9 doesn't run a pasted script directly. When you're done, the client has its own script file and an Agent Procedure that writes the .ps1 to each computer and runs it with 64-bit PowerShell as System, on a daily schedule.

Before you start

  • The client's script. In Engage, open the client, then Shadow AI Usage under Compass, then the Deployment tab. Expand Deploy with your RMM and click Copy script. It already carries this client's key, so paste it unchanged. This guide keeps one copy per client. If you'd rather keep one script, store each client's key in a client-level RMM variable and put that variable in place of the $ClientKey value. The full script and what it does: Deploy the extension with your RMM.

Upload the client's script

  1. Paste the script you copied from Engage into a new file, unchanged. Save it as lemhi-extension-<client>.ps1.

  2. Upload it to Agent Procedures → Manage Files Stored on Server (Shared Files).

Build the procedure

Open Agent Procedures → Manage Procedures → New Procedure and name it Lemhi AI Usage extension - <Client>. Add these steps:

#

Step

Parameters

1

writeFile

Server file: lemhi-extension-<client>.ps1 → #vAgentConfiguration.agentTempSecureDir#\lemhi-extension.ps1

2

executePowerShell64BitSystem

File: #vAgentConfiguration.agentTempSecureDir#\lemhi-extension.ps1, no arguments, output to the procedure log

3

deleteFile

#vAgentConfiguration.agentTempSecureDir#\lemhi-extension.ps1

Reference: VSA 9 agent procedure commands.

An older VSA 9 layout: right-click a procedure folder under Schedule / Create and choose New Procedure

Pilot on one computer

  1. Run the procedure on one machine.

An older VSA 9 layout of Schedule / Create, with the client's procedure selected and one machine ready for Run Now
  1. Check Procedure History for the result. The script's output is in the procedure log.

  2. Restart the browsers on that computer.

  3. Within a few minutes it appears on the client's Deployment tab.

"Extension not installed yet" is expected until the browser restarts. A failed run (exit code 1) means the key isn't a valid Lemhi key, usually because it was mangled in the copy, or a value didn't read back. Copy the script from Engage again and re-run.

Schedule it on the client

Schedule the client's procedure on the client's machine group, recurring daily. Re-runs are safe.

The Schedule tab in an older VSA 9 layout, showing the next run time for a machine

Rotate the key or remove

To rotate the key, regenerate it on the Deployment tab, then click Copy script again: the copied script carries the new key. Save it over the client's .ps1, re-upload it over the old file, and run the procedure on the group now. See Rotate a client's deployment key.

To remove the extension: Cancel the schedule. Build a second procedure the same way using the removal script and run it on the group. See Remove the extension from a client's computers.

Related