- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm still convinced that doing these explicit Import-Module lines (be it for VMware.PowerCLI or VMware.VimAutomation.Core or any other module) is a bad coding practice.
Unless you want to load a specific version of a module of which you have multiple versions installed or for a module that is not located in a folder in $PSModulePath.
Module Auto-Loading, introduced in PSv3, loads the correct module at the time you use the 1st cmdlet from a module.
PS builds that module-cmdlet cache in any case, so why not use it?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I completely agree. I would love to remove this from our profile.ps1 file. However, as the only workaround we've found to prevent premature transcript termination, it's the only way I've come up with to ensure that logs continue to populate properly until this issue is actually solved.