> ## Documentation Index
> Fetch the complete documentation index at: https://tally.wharflab.com/llms.txt
> Use this file to discover all available pages before exploring further.

# powershell/PSMissingModuleManifestField

> Module Manifest Fields

`powershell/PSMissingModuleManifestField` is a PSScriptAnalyzer diagnostic emitted by tally for PowerShell snippets embedded in Dockerfiles.

| Property | Value             |
| -------- | ----------------- |
| Severity | Warning           |
| Category | PSScriptAnalyzer  |
| Default  | Disabled in tally |
| Auto-fix | No                |

<Note>
  tally disables this rule by default because Dockerfiles do not ship PowerShell module
  manifests (`.psd1` files) — this rule targets module-authoring artifacts that are out of
  scope for container builds. Re-enable it with
  `include = ["powershell/PSMissingModuleManifestField"]` or by setting
  `rules.powershell.PSMissingModuleManifestField.severity = "warning"` in `.tally.toml`.
</Note>

## Description

A module manifest is a `.psd1` file that contains a hash table. The keys and values in the hash
table describe the contents and attributes of the module, define the prerequisites, and determine
how the components are processed.

Module manifests must contain the following keys (and a corresponding value) to be considered valid:

* `ModuleVersion`

All other keys are optional. The order of the entries is not important.

## How

Please consider adding the missing fields to the manifest.

## Examples

### Problematic code

```powershell theme={null}
@{
    Author              = 'PowerShell Author'
    NestedModules       = @('.\mymodule.psm1')
    FunctionsToExport   = '*'
    CmdletsToExport     = '*'
    VariablesToExport   = '*'
}
```

### Correct code

```powershell theme={null}
@{
    ModuleVersion       = '1.0'
    Author              = 'PowerShell Author'
    NestedModules       = @('.\mymodule.psm1')
    FunctionsToExport   = '*'
    CmdletsToExport     = '*'
    VariablesToExport   = '*'
}
```

## Source

This rule documentation is adapted from Microsoft's PSScriptAnalyzer documentation for
[MissingModuleManifestField](https://github.com/MicrosoftDocs/PowerShell-Docs-Modules/blob/main/reference/docs-conceptual/PSScriptAnalyzer/Rules/MissingModuleManifestField.md),
licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
