PowerShell Logo Small

New-ModuleManifest



This is the built-in help made by Microsoft for the command 'New-ModuleManifest', in PowerShell version 2 - as retrieved from Windows version 'Microsoft® Windows Vista™ Ultimate ' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Creates a new module manifest.

SYNTAX


New-ModuleManifest [-Path] <string> -Author <string> -CompanyName <string> -Copyright <string> -Description <string> -FileList <string[]> -Format
sToProcess <string[]> -ModuleToProcess <string> -NestedModules <string[]> -RequiredAssemblies <string[]> -TypesToProcess <string[]> [-AliasesToEx
port <string[]>] [-ClrVersion <Version>] [-CmdletsToExport <string[]>] [-DotNetFrameworkVersion <Version>] [-FunctionsToExport <string[]>] [-Guid
<Guid>] [-ModuleList <Object[]>] [-ModuleVersion <Version>] [-PassThru] [-PowerShellHostName <string>] [-PowerShellHostVersion <Version>] [-Powe
rShellVersion <Version>] [-PrivateData <Object>] [-ProcessorArchitecture {None | MSIL | X86 | IA64 | Amd64}] [-RequiredModules <Object[]>] [-Scri
ptsToProcess <string[]>] [-VariablesToExport <string[]>] [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The New-ModuleManifest cmdlet creates a new module manifest (.psd1) file, populates its values, and saves the manifest file in the specified path
.

Module authors can use this cmdlet to create a manifest for their module. A module manifest is a .psd1 file that contains a hash table. The keys
and values in the hash table describe the contents and attributes of the module, define the prerequisites, and determine how the components are p
rocessed. Manifests are not required for a module.

New-ModuleManifest creates a manifest that includes all of the commonly used manifest keys, so you can use the default output as a manifest templ
ate. To add or change values, or to add module keys that this cmdlet does not add, open the resulting file in a text editor.

Each parameter of this cmdlet (except for Path and PassThru) creates a module manifest key and its value. In a module manifest, only the ModuleVe
rsion key is required. However, several other parameters of this cmdlet are mandatory. As a result, you can type a "New-ModuleManifest" command w
ithout parameters and the cmdlet will prompt you for values for other commonly used keys. To leave the value empty, press ENTER.

For a complete description of the format, effects, and requirements of a module manifest, see "How to Write a Module Manifest" in the MSDN (Micro
soft Developer Network) library at http://go.microsoft.com/fwlink/?LinkId=143613.



<

RELATED LINKS

Online version: http://go.microsoft.com/fwlink/?LinkID=141555
Import-Module
Get-Module
New-Module
Remove-Module
Export-ModuleMember
Test-ModuleManifest
about_Modules

REMARKS

<

Examples


-------------------------- EXAMPLE 1 --------------------------

C:\PS>New-ModuleManifest

Path: C:\Users\User01\Documents\WindowsPowerShell\Modules\Test-Module\Test-Module.psd1
NestedModules[0]: BackgroundModule.psm1
Author: Jinghao Liu
CompanyName: Fabrikam, Inc.
Copyright: Copyright © 2009 Liu Jinghao. All rights reserved.
ModuleToProcess: TestModule.psm1
Description: Cmdlets to find common errors in scripts.
TypesToProcess[0]: TestTypes.ps1xml
FormatsToProcess[0]: TestFormat.ps1xml
RequiredAssemblies[0]: Test.dll
FileList[0]: Test-Module.psd1
FileList[1]: Test-Module.psm1
FileList[2]: BackgroundModule.psm1
FileList[3]: TestTypes.ps1xml
FileList[4]: TestFormat.ps1xml
FileList[5]: Test.dll
FileList[6]: TestIcon.ico



Description
-----------
This command creates a new module manifest. The cmdlet prompts you for the parameters that it requires, including the Path parameter, and creates
a manifest file in the specified location.

The output of this command shows sample responses to the prompts. To use default values, press ENTER.

The actual prompt, and its handling of quoted and non-quoted phrases, depends on the host program in which Windows PowerShell is running.








-------------------------- EXAMPLE 2 --------------------------

C:\PS>New-ModuleManifest -PowerShellVersion 1.0 -AliasesToExport JKBC, DRC, TAC



Description
-----------
This command creates a new module manifest. The command includes parameters that the cmdlet does not require (or prompt for). You can include oth
er manifest key values at the prompt.








-------------------------- EXAMPLE 3 --------------------------

C:\PS>New-ModuleManifest -RequiredModules FileTransfer,@{ModuleName="BackgroundModule";GUID="486569a2-2784-48bf-af15-70ba837a64d0";ModuleVersion=
"3.5"}



Description
-----------
This example shows how to use the string and hash table formats of the RequiredModules parameter value. Strings and hash tables can be used in th
e same command.

This command commands creates a module manifest for a module that requires the FileTransfer module and a (fictitious) module named "BackgroundMod
ule".

The command uses a string format to specify the name of the FileTransfer module and the hash table format to specify the name, a GUID, and a vers
ion of the BackgroundModule.