February 2019
Intermediate to advanced
626 pages
15h 51m
English
A PowerShell module may have one or more dependencies. The dependencies should be included in the module manifest under the RequiredModules key.
Dependencies may be defined using a module name only, or alternatively as a module specification. For example:
RequiredModules = @( 'Configuration' @{ ModuleName = 'Pester'; ModuleVersion = '4.6.0' })
The hashtable used in the preceding example may also use the MaximumVersion or RequiredVersion keys. If a module is loaded by name, the latest version will be used.
When publishing a module, the Publish-Module command will attempt to validate stated dependencies. The dependencies should be locally available or publishing may fail.
Read now
Unlock full access