February 2019
Intermediate to advanced
626 pages
15h 51m
English
PowerShell 3 and later will attempt to automatically load modules if a command from that module is used and the module is under one of the paths in the $env:PSModulePath environment variable. The Import-Module command is less important than it was in Windows PowerShell 2.
For example, if PowerShell is started and the PSDesiredStateConfiguration module is not imported, running the Get-DscResource command will cause the module to be imported. This is shown in the following example:
PS> Get-Module PSDesiredStateConfigurationPS> Get-DscResource | Out-NullPS> Get-Module PSDesiredStateConfigurationModuleType Version Name ExportedCommands---------- ------- ---- ---------------- Manifest 1.1 PSDesiredStateConfiguration ... ...
Read now
Unlock full access