-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export-M365DSCConfiguration loads all DSCResources #1745
Comments
Agreed that it would be great to be able to only do a selective load, but in this case we need to load each resource to analyze it's parameters and figure out if it is something we can export based on the parameters passed in by the user. This will no longer be required when everything is standardized on Microsoft Graph under the cover, but currently this is a requirement. The function Get-M365DSCComponentsForAuthenticationType is the culprit here. I'll park this issue for review at a later time once we have our authentication model standardized across all workloads. |
As soon as there are components defined, the scope of the export is already set. Wouldn't it be sufficient to only load these selected components? The issue about authentication could be solved by extending the modules.psd1 for example. We could add the supported authentication methods over there and validate those against the input parameters. Is there something I'm missing? |
Details of the scenario you tried and the problem that is occurring
Running the following lines of code will load all DSCResources within the module:
Verbose logs showing the problem
Suggested solution to the issue
From a performance perspective, it would be great to only load modules, that are needed for the export.
The DSC configuration that is used to reproduce the issue (as detailed as possible)
# insert configuration here
The operating system the target node is running
Version of the DSC module that was used ('dev' if using current dev branch)
The text was updated successfully, but these errors were encountered: