-
Notifications
You must be signed in to change notification settings - Fork 1
Custom Functions
Eli Weitzman edited this page Aug 2, 2024
·
1 revision
With the release of ETT 1.3, adding custom functions to an ETT install has gotten even easier! You can now embed your own PowerShell scripts into ETT using the ETTConfig.json file, which handily features a section called "Custom Functions." There is no limit to how many custom functions you add, however there is a necessary format requirement.
Custom functions require the following information:
- displayName - this will be the name shown within the ETT Toolbox
- description - this will be added to the tooltip of the function, and provides some insight into what the function does
- tab - this allows you to set whichever respective tab you want your function to appear in.
- requireAdmin - this value is true or false, and will lock it's functionality to requiring ETT to be run in Admin or Non-Admin mode.
- codeBlock - this is the code being added. NOTE: Currently, all scripts need to be compiled into single-liners. (Converter targeting 1.3.1 release potentially).
Example:
{
"displayName": "Display Hello World",
"description": "Returns a friendly 'Hello, World!' message.",
"tab" : "",
"requireAdmin" : true,
"codeBlock": "System.__ComObject = New-Object -ComObject Wscript.Shell; System.__ComObject.Popup('Hello, World!', 0, 'Hello, World!', 0x1)"
}