You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modules/module-development/README.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,34 @@ options:
32
32
strict: true
33
33
```
34
34
35
+
## Special Options
36
+
37
+
Empire reserves certain option names that receive special handling during module execution. These are filtered out of the parameters passed to the module's script and instead control how the task is dispatched or processed.
38
+
39
+
### Agent
40
+
**Required on all modules.** Identifies which agent should execute the module. This is automatically populated by Empire and should not be included in the module's script logic.
41
+
42
+
### Background
43
+
Allows the operator to override the module-level `background` field at runtime. When a module defines `background: true` in its YAML metadata, it will run as a background job by default. Adding a `Background` option lets operators choose per-execution whether to run in the foreground or background.
44
+
45
+
```yaml
46
+
options:
47
+
- name: Background
48
+
description: Run as a background job (non-blocking). Can be killed via the jobs/kill_job endpoint.
49
+
required: false
50
+
value: 'true'
51
+
type: bool
52
+
suggested_values:
53
+
- 'true'
54
+
- 'false'
55
+
strict: true
56
+
```
57
+
58
+
If the `Background` option is not defined on the module, the module-level `background` field is used as-is.
59
+
60
+
### OutputFunction
61
+
PowerShell-specific. Controls how module output is formatted. Substituted into the script via the `{{ OUTPUT_FUNCTION }}` placeholder. Defaults to `Out-String`. See [PowerShell Modules](powershell-modules.md) for details.
62
+
35
63
## Advanced Options
36
64
37
65
Empire modules support advanced configuration for dynamic dependencies between options. For example, one option may depend on the value of another option. This is handled using the `depends_on` field.
0 commit comments