Skip to content

New-ModuleManifest does not create new PSData Properties from Update-ModuleManifest #8585

@ThomasNieto

Description

@ThomasNieto

Update-ModuleManifest added Prerelease, RequireLicenseAcceptance, and ExternalModuleDependencies properties. New-ModuleManifest does not create commented out properties or have parameters to manage these new properties.

New-ModuleManifest
Update-ModuleManifest

Steps to reproduce

New-ModuleManifest -Path test.psd1
Update-ModuleManifest -Path test.psd1

Expected behavior

New-ModuleManifest creates Prerelease, RequireLicenseAcceptance, and ExternalModuleDependencies properties.

PSData = @{

        # Tags applied to this module. These help with module discovery in online galleries.
        # Tags = @()

        # A URL to the license for this module.
        # LicenseUri = ''

        # A URL to the main website for this project.
        # ProjectUri = ''

        # A URL to an icon representing this module.
        # IconUri = ''

        # ReleaseNotes of this module
        # ReleaseNotes = ''

        # Prerelease string of this module
        # Prerelease = ''

        # Flag to indicate whether the module requires explicit user acceptance for install/update/save
        # RequireLicenseAcceptance = $false

        # External dependent modules of this module
        # ExternalModuleDependencies = @()

    } # End of PSData hashtable

Actual behavior

New-ModuleManifest does not create Prerelease, RequireLicenseAcceptance, and ExternalModuleDependencies properties.

PSData = @{

        # Tags applied to this module. These help with module discovery in online galleries.
        # Tags = @()

        # A URL to the license for this module.
        # LicenseUri = ''

        # A URL to the main website for this project.
        # ProjectUri = ''

        # A URL to an icon representing this module.
        # IconUri = ''

        # ReleaseNotes of this module
        # ReleaseNotes = ''

    } # End of PSData hashtable

Environment data

Tested on 6.1.1 and 6.2.0-preview.3

Name                           Value
----                           -----
PSVersion                      6.1.1
PSEdition                      Core
GitCommitId                    6.1.1
OS                             Microsoft Windows 10.0.17134
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Name                           Value
----                           -----
PSVersion                      6.2.0-preview.3
PSEdition                      Core
GitCommitId                    6.2.0-preview.3
OS                             Microsoft Windows 10.0.17134
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Get-Command -Name Update-ModuleManifest

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Function        Update-ModuleManifest                              2.0.3      PowerShellGet

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugWG-Cmdlets-Corecmdlets in the Microsoft.PowerShell.Core module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions