Dependencies

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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.47.178