Summary of the new feature / enhancement
As mentioned in #2875 (comment)
Another solution would be to have an option to remove all the comments generated by New-ModuleManifest, then it would not be needed. One should not be hand editing module manifests, they should be generated to comply with the module import requirements..
We should look to add a switch that removes all descriptive comments as part of New-ModuleManifest cmdlet, whilst retaining any of the commented out properties that are a part of the Module Manifest definition.
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.
The above comment however is out of scope for this particular issue at this time & should be discussed in another issue which I will raise shortly.
We however should determine whether we want this comment block that is created at the top of a manifest or not, my feeling is that for most people this would be a no.
#
# Module manifest for module 'c2'
#
# Generated by: Ryan Yates
#
# Generated on: Mon 31 08 2026
#
Proposed technical implementation details (optional)
Add -NoComments switch parameter to New-ModuleManifest cmdlet as to produce this layout of a module manifest, when called like this New-ModuleManifest a1.psd1 so that you get the whole manifest shape like so.
@{
# RootModule = ''
ModuleVersion = '0.0.1'
# CompatiblePSEditions = @()
GUID = 'b02e941a-81c0-44cf-9ac1-2ed2a891eaeb'
Author = 'RyanYates'
CompanyName = 'Unknown'
Copyright = '(c) RyanYates. All rights reserved.'
# Description = ''
# PowerShellVersion = ''
# PowerShellHostName = ''
# PowerShellHostVersion = ''
# DotNetFrameworkVersion = ''
# ClrVersion = ''
# ProcessorArchitecture = ''
# RequiredModules = @()
# RequiredAssemblies = @()
# ScriptsToProcess = @()
# TypesToProcess = @()
# FormatsToProcess = @()
# NestedModules = @()
FunctionsToExport = @()
CmdletsToExport = @()
VariablesToExport = '*'
AliasesToExport = @()
# DscResourcesToExport = @()
# ModuleList = @()
# FileList = @()
PrivateData = @{
PSData = @{
# Tags = @()
# LicenseUri = ''
# ProjectUri = ''
# IconUri = ''
# ReleaseNotes = ''
Prerelease = 'test'
# RequireLicenseAcceptance = $false
# ExternalModuleDependencies = @()
}
}
# HelpInfoURI = ''
# DefaultCommandPrefix = ''
}
Summary of the new feature / enhancement
As mentioned in #2875 (comment)
We should look to add a switch that removes all descriptive comments as part of New-ModuleManifest cmdlet, whilst retaining any of the commented out properties that are a part of the Module Manifest definition.
The above comment however is out of scope for this particular issue at this time & should be discussed in another issue which I will raise shortly.
We however should determine whether we want this comment block that is created at the top of a manifest or not, my feeling is that for most people this would be a no.
Proposed technical implementation details (optional)
Add
-NoCommentsswitch parameter to New-ModuleManifest cmdlet as to produce this layout of a module manifest, when called like thisNew-ModuleManifest a1.psd1so that you get the whole manifest shape like so.