This PR is an attempt at making the EXO command import smarter so that a user of the module can specify, which cmdlets of the EXO module to import. This results in a massively reduced memory consumption.
Three new values are added to the ExchangeOnline workload:
CmdletsToLoad - The cmdlets of the EXO module to load
LoadedCmdlets - An internal variable that holds the currently loaded cmdlets
LoadedAllCmdlets - An internal variable that tells if all cmdlets of the EXO module were loaded
The approach is designed to increasingly load the new cmdlets (if specified), and if none are specified (by either omitting the new parameter ExchangeOnlineCmdlets or setting its value to @()), it will load all cmdlets in the entire module.
Please note: I was unable to test the functionality with the PSSession handling. This is a pure luck shot and needs testing by people who can reproduce that scenario.
@NikCharlebois
This PR is an attempt at making the EXO command import smarter so that a user of the module can specify, which cmdlets of the EXO module to import. This results in a massively reduced memory consumption.
Three new values are added to the
ExchangeOnline
workload:CmdletsToLoad
- The cmdlets of the EXO module to loadLoadedCmdlets
- An internal variable that holds the currently loaded cmdletsLoadedAllCmdlets
- An internal variable that tells if all cmdlets of the EXO module were loadedThe approach is designed to increasingly load the new cmdlets (if specified), and if none are specified (by either omitting the new parameter
ExchangeOnlineCmdlets
or setting its value to@()
), it will load all cmdlets in the entire module.Please note: I was unable to test the functionality with the
PSSession
handling. This is a pure luck shot and needs testing by people who can reproduce that scenario.With that functionality, we can most likely improve the situation of https://github.com/microsoft/Microsoft365DSC/issues/4982.
This change is