Skip to content

Scripts Definitions Files

Jakub Šindelář edited this page Sep 17, 2020 · 1 revision

Overview

You will learn all about creation of Scripts definitions on this page. Scripts definitions are the bridge, which converts console scripts and commands to GUI of Lazy Admin. For that to work, you have to specify command block which gets executed nad parameters you expect. You should as well specify other various things, like display name, description, external help etc.

Examples

Base module example in our repository contains various commands utilizing all kinds of parameters available for Scripts definitions. It is very good idea to play around with that file to see what you can achieve.

Active Directory module example in our repository contains sample command which utilizes Active Directory.

Parameters

All parameters are subkeys of one single key, which serves as unique identifier for each Scripts definitions file, for example our Base module example looks like this:

{
  "base-module-example": {
    "version": "0.2.0",
    "icon": "mdi-powershell",
    ...
  }
}

version

Version is simple string, which is displayed on About Page. On update,

icon

displayName

description

definition

Definition's parameters

commandName

icon

returns

progress

insidePsSession

usesLoginObjects

confirm

friendlyName

description

help

login

name

description

commandBlock

parameters

parameter

format

value

required

type

hint

commandBlock

workflow

acceptsParams

joinParamsAsString

returns

insidePsSession

confirm

passedParameters

parameters

parameter

format

value

required

type

hint

commandBlock

Clone this wiki locally