Skip to content
Mark Domansky edited this page Apr 11, 2026 · 6 revisions

Concepts

  • WebJEA's is controlled by a json configuration file, by default located at c:\scripts\config.json.
  • Modifying WebJEA's configuration file is done by editing the json file directly.
  • The top-level settings:
    • Page Title
    • Log Parameters (by default, can be overridden per command)
    • Default Access groups (groups that will have access to all commands)
  • Commands - Each command contains a name and set of optional features.
    • Synopsis - recommended only for landing pages, is a pure html section of text and works well to direct the user to where they need to go. If specified, it will override what is found in the script.
    • Script - this is the script the form will be generated from. It does not support Parameter Sets but does support most advanced function features
    • Onload Script - this script will run when the page for the command is loaded
    • Log Parameters - override whether this script logs parameters.
    • Permitted Groups - a list of local or domain, users or groups that should have access to this command. The format is domain\user.

API

Body
@{
  cmdid = 'apitest'
  parameters = @{
    Identity = 'ABC'
  }
}
$cred = get-credential
Invoke-WebRequest -method POST -contenttype 'application/json' -url 'https://fqdn/api/execute' -credential $cred

Features

  • Take a multi-line input.
    [Parameter()]
    #WEBJEA-Multiline
    [string]$StrInput
  • To take a date parameter input
    [Parameter()]
    [datetime]$DTInput
  • To take a parameter with date and time input
    [Parameter()]
      #WEBJEA-DateTime
    [datetime]$DTInput
  • To obtain the authenticated user's username use $env:WebJEAUsername.
    Deprecation Note: Older versions of WebJEA supported a hidden parameter of $WebJEAUsername. Please migrate to using the environment variable.
  • To obtain the authenticated user's hostname use $env:WebJEAHostname.
    Deprecation Note: Older versions of WebJEA supported a hidden parameter of $WebJEAHostname. Please migrate to using the environment variable. WebJEAHostname typically returns an IP Address. It is named Hostname because that's what IIS says it is.

Clone this wiki locally