API Reference
Command
Import-ModuleDependency
Imports a module runtime by exact paths, with dependencies loaded before the root module.
Remarks
Use -Name to import dependencies directly from a module's bundled Internals\Modules payload and then import that module by exact path. Add -Path after Install-ModuleDependency to import the private runtime copy without relying on PSModulePath discovery.
Examples
Import dependencies bundled inside a module, then import the module
Import-ModuleDependency -Name EntraIDConfig
Import a private runtime folder created by Install-ModuleDependency
Import-ModuleDependency -Name EntraIDConfig -Path C:\PrivateDeps
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
Import-ModuleDependency [-DependencyName <String[]>] [-Force] [-Name <String>] [-PassThru] [-Path <String>] [-RequiredVersion <Version>] [<CommonParameters>]#Parameter set:
ByNameParameters
- DependencyName String[]
- Dependency names to import. When omitted, imports all dependencies in the receipt.
- Force SwitchParameter
- Force re-import of modules already loaded in the session.
- Name String
- Module containing embedded dependencies.
- PassThru SwitchParameter
- Return imported module information from Import-Module -PassThru.
- Path String
- Installed dependency root or module-dependencies.json receipt path.
- RequiredVersion Version
- Optional exact source module version when using -Name or -Module.
Import-ModuleDependency [-DependencyName <String[]>] [-Force] -Module <PSObject> [-PassThru] [-Path <String>] [-RequiredVersion <Version>] [<CommonParameters>]#Parameter set:
ByModuleParameters
- DependencyName String[]
- Dependency names to import. When omitted, imports all dependencies in the receipt.
- Force SwitchParameter
- Force re-import of modules already loaded in the session.
- Module PSObject
- Specific module object containing embedded dependencies.
- PassThru SwitchParameter
- Return imported module information from Import-Module -PassThru.
- Path String
- Installed dependency root or module-dependencies.json receipt path.
- RequiredVersion Version
- Optional exact source module version when using -Name or -Module.
Import-ModuleDependency [-DependencyName <String[]>] [-Force] [-PassThru] -Path <String> [<CommonParameters>]#Parameter set:
ByPathParameters
- DependencyName String[]
- Dependency names to import. When omitted, imports all dependencies in the receipt.
- Force SwitchParameter
- Force re-import of modules already loaded in the session.
- PassThru SwitchParameter
- Return imported module information from Import-Module -PassThru.
- Path String
- Installed dependency root or module-dependencies.json receipt path.