Skip to content

Files

Latest commit

 

History

History
33 lines (19 loc) · 748 Bytes

AvoidUsingDeprecatedManifestFields.md

File metadata and controls

33 lines (19 loc) · 748 Bytes

Pattern: Use of deprecated manifest field

Issue: -

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.

Example of incorrect code:

ModuleToProcess ='psscriptanalyzer'

ModuleVersion = '1.0'

Example of correct code:

RootModule ='psscriptanalyzer'

ModuleVersion = '1.0'

Further Reading