This cmdlet updates the data stored in a module manifest file. The parameters allow you to specify
which properties get updated. Update-PSModuleManifest overwrites any existing values in the module
manifest.
The cmdlet doesn't return an object.
Examples
Example 1
This example changes the Author property in the module manifest to New Author.
Specifies the formatting files (.ps1xml) that are processed when the module is imported.
When you import a module, PowerShell runs the Update-FormatData cmdlet with the specified files.
Because formatting files aren't scoped, they affect all session states in the session.
Specifies an array of modules that are included in the module.
Enter each module name as a string or as a hashtable with ModuleName and ModuleVersion keys.
The hashtable can also have an optional GUID key. You can combine strings and hashtables in the
parameter value.
This key is designed to act as a module inventory.
Specifies script modules (.psm1) and binary modules (.dll) that are imported into the module's
session state. The files in the NestedModules key run in the order in which they're listed.
Enter each module name as a string or as a hashtable with ModuleName and ModuleVersion keys.
The hashtable can also have an optional GUID key. You can combine strings and hashtables in the
parameter value.
Specifies the name of the PowerShell host program that the module requires. Enter the name of the
host program, such as PowerShell ISE Host or ConsoleHost. Wildcards aren't permitted.
The name of a host program is stored in $Host.Name.
Specifies the prerelease value that's appended to the module version. For example, if
Prerelease is preview and the ModuleVersion is 1.0.0, the version of the module is
1.0.0-preview.
Specifies the assembly (.dll) files required by the module. PowerShell loads the specified
assemblies before updating types or formats, importing nested modules, or importing the module file
specified in the RootModule key.
Use RequiredAssemblies for assemblies that must be loaded to update any formatting or type files
that are listed in the FormatsToProcess or TypesToProcess keys, even if those assemblies are
also listed in the NestedModules key.
Specifies modules that must be in the global session state. If the required modules aren't in the
global session state, PowerShell imports them. If the required modules aren't available, the
Import-Module command fails.
The value can be an array containing module names or module specifications. A module specification
is a hashtable that has the following keys.
ModuleName - Required Specifies the module name.
GUID - Optional Specifies the GUID of the module.
It's also Required to specify at least one of the three below keys.
ModuleVersion - Specifies a minimum acceptable version of the module.
MaximumVersion - Specifies the maximum acceptable version of the module.
RequiredVersion - Specifies an exact, required version of the module. This can't be used with
the other Version keys.
Specifies the primary or root file of the module. Enter the filename of a script (.ps1), a script
module (.psm1), a module manifest (.psd1), an assembly (.dll), or a cmdlet definition XML file
(.cdxml). When the module is imported, the members exported from the root module are imported into
the caller's session state.
If a module has a manifest file and no file is specified in the RootModule key, the manifest
becomes the primary file for the module. The module is known as a manifest module (ModuleType =
Manifest).
To export members from .psm1 or .dll files, the names of those files must be specified in the
values of the RootModule or NestedModules keys in the manifest.
Specifies script (.ps1) files that run in the caller's session state when the module is imported.
You can use these scripts to prepare an environment, just as you might use a login script.
To specify scripts that run in the module's session state, use the NestedModules key.
Specifies the type files (.ps1xml) that run when the module is imported.
When you import the module, PowerShell runs the Update-TypeData cmdlet with the specified files.
Because type files aren't scoped, they affect all session states in the session.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.