Script Repository

The Script Repository stores reusable scripts for Lanview administrators.

It allows authorised users to create, organise and maintain scripts in Lanview Studio before running them through supported remote execution features.

Repository management and script execution are separate. A user may be allowed to view or edit scripts without being allowed to run them on devices.

What the repository is for

Use the Script Repository for scripts that are expected to be reused, reviewed or maintained over time.

Common uses include:

  • standard support checks
  • repeatable maintenance commands
  • software repair scripts
  • device information collection
  • controlled administrative routines

In the current version, a script must be saved in the Script Repository before it can be run on managed devices. One-off script entry at execution time is not currently available.

Folders and organisation

Scripts can be organised into folders.

Folders help separate scripts by purpose, support team, application, device type or operational risk.

A clear folder structure makes scripts easier to find and reduces the chance of running the wrong one.

Creating a script

To create a script:

  1. Open the Scripts module in Lanview Studio.
  2. Select the folder where the script should be stored, or use the repository root.
  3. Choose the option to create a new script.
  4. Enter a clear name and description.
  5. Enter or paste the script content.
  6. Review the script for device-specific paths, prerequisites and sensitive values.
  7. Save the script.

Use the description to explain what the script does, what it changes, any prerequisites and whether a restart or user interruption may occur.

After saving, reopen the script and confirm that the content and folder are correct before using it against a device.

Editing and organising scripts

Select an existing script to edit its name, description or content.

Scripts can be moved between folders where the user has the required repository permissions. Review scripts after moving or duplicating them so that descriptions and assumptions remain accurate.

Changes to a reusable script can affect future executions. Treat edits to widely used or high-impact scripts as controlled administrative changes.

Running scripts

Running a script against a device or group is a remote execution action.

To run a saved script:

  1. Select the target device or group.
  2. Open the supported script execution action.
  3. Choose the saved script.
  4. Review the target and script before submitting.
  5. Enter a reason if prompted.
  6. Submit the task and review its result in the Tasks module or Device Window.

The user must have the correct remote execution permission for the target type. Repository permissions do not automatically grant execution permission.

Permissions

Script repository permissions include:

PermissionAllows
scripts.viewView saved scripts.
scripts.createCreate scripts.
scripts.editEdit saved scripts.
scripts.deleteDelete saved scripts.
scripts.manage_foldersCreate, rename, move or delete script folders.
remote_execute.script.deviceRun scripts against devices.
remote_execute.script.groupRun scripts against groups.

Use separate roles for script authors and script operators where the organisation requires review before execution.

Audit behaviour

Running a script is audited as a remote execution action.

Script repository changes may also be audited depending on the current audit configuration.

Remote execution output can contain sensitive information. Avoid writing scripts that print passwords, tokens, private keys or other secret material.

Security guidance

Do not use the Script Repository as a secrets store.

Avoid embedding:

  • passwords
  • recovery keys
  • API tokens
  • licence keys
  • connection strings
  • private URLs containing credentials

Where a script needs sensitive values, use an approved secure process rather than embedding them in the script.

Common problems

A user can edit a script but cannot run it

Repository permissions and execution permissions are separate. Check the user's roles and remote execution permissions.

A script works on one device but fails on another

Check the target device's PowerShell version, installed software, execution context, path assumptions and permissions.

A script is not available when selecting a target

Confirm that the script was saved successfully, that it is in a folder the user can view, and that the user has the appropriate execution permission for the selected device or group.

Script output shows too much information

Review the script and remove unnecessary output. Avoid returning full configuration files, environment variables or other data that is not needed for the task.

A changed script behaves differently from earlier runs

Review the saved content and task history. Repository edits affect future executions, so check who changed the script and whether its prerequisites or parameters also changed.