Add Switch as to remove commented out properties from the New-ModuleManifest Cmdlet · Issue #27967 · PowerShell/PowerShell · GitHub
Skip to content

Add Switch as to remove commented out properties from the New-ModuleManifest Cmdlet #27967

Description

@kilasuit

Summary of the new feature / enhancement

This issue is for the following comment in #27946 that meets more of the communities request to have a minimised manifest that has no unused properties included.

As a separate issue, I feel we should look at how we further minimise the output from New-ModuleManifest to meet regular comments from the community around unneeded/unnecessary properties that form the Manifest from being included in the output, to help reduce needs for workarounds, likely via another switch along the lines of NoCommentedProperties.

Proposed technical implementation details (optional)

Add -NoCommentedProperties switch parameter to New-ModuleManifest cmdlet as to produce this layout of a module manifest, when called like this New-ModuleManifest a1.psd1 -NoCommmentedProperties so that you get the whole manifest shape like so.

@{
ModuleVersion = '0.0.1'
GUID = 'b02e941a-81c0-44cf-9ac1-2ed2a891eaeb'
Author = 'RyanYates'
CompanyName = 'Unknown'
Copyright = '(c) RyanYates. All rights reserved.'
FunctionsToExport = @()
CmdletsToExport = @()
VariablesToExport = '*'
AliasesToExport = @()
PrivateData = @{
    PSData = @{
        Prerelease = 'test'
    }
}
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugNeeds-TriageThe issue is new and needs to be triaged by a work group.WG-Cmdletsgeneral cmdlet issuesWG-NeedsReviewNeeds a review by the labeled Working Group

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions