< Back

Import-OnDemandModule

Sat Jan 18, 2020 5:50 pm

NAME Import-OnDemandModule



SYNOPSIS

Allows to import modules on demand.





SYNTAX

Import-OnDemandModule [-Name] <String> [[-Path] <String>] [<CommonParameters>]





DESCRIPTION

When you install modules with Install-Module, it saves the modules to one of folder in `$env:PSModulePath. Those

modules are imported automatically evrytime powershell is started. OnDemandModule allows you to import modules

with their name only without specifying path





PARAMETERS

-Name <String>

Name of the Module you would like to import



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Path <String>

Path of the module. it is set to `$OnDemandModulePath by default



Required? false

Position? 2

Default value $OnDemandModulePath

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



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



PS C:\\>Import-OnDemandModule -Name VMWare.PowerCLI















RELATED LINKS