> ## 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/PSAvoidUsingDeprecatedManifestFields

> Avoid Using Deprecated Manifest Fields

`powershell/PSAvoidUsingDeprecatedManifestFields` 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/PSAvoidUsingDeprecatedManifestFields"]` or by setting
> `rules.powershell.PSAvoidUsingDeprecatedManifestFields.severity = "warning"` in `.tally.toml`.

## Description

In PowerShell 5.0, a number of fields in module manifest files (`.psd1`) have been changed.

The field `ModuleToProcess` has been replaced with the `RootModule` field.

## How

Replace `ModuleToProcess` with `RootModule` in the module manifest.

## Examples

### Problematic code

```powershell theme={null}
ModuleToProcess ='psscriptanalyzer'

ModuleVersion = '1.0'
```

### Correct code

```powershell theme={null}
RootModule ='psscriptanalyzer'

ModuleVersion = '1.0'
```

## Source

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


## Related topics

- [powershell/PSUseToExportFieldsInManifest](https://tally.wharflab.com/rules/powershell/PSUseToExportFieldsInManifest.md)
- [powershell/PSAvoidUsingWMICmdlet](https://tally.wharflab.com/rules/powershell/PSAvoidUsingWMICmdlet.md)
- [powershell/PSMissingModuleManifestField](https://tally.wharflab.com/rules/powershell/PSMissingModuleManifestField.md)
- [powershell/PSAvoidUsingInvokeExpression](https://tally.wharflab.com/rules/powershell/PSAvoidUsingInvokeExpression.md)
- [powershell/PSAvoidUsingPositionalParameters](https://tally.wharflab.com/rules/powershell/PSAvoidUsingPositionalParameters.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.