-
Notifications
You must be signed in to change notification settings - Fork 525
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
Filtering within specific exports #1691
Comments
You could use DSCParser to generate an object representation of your configuration. This object can be filtered and you should be able to extract the resources. Generating a new configuration would still be tricky though. https://nikcharlebois.com/dscparser-analyze-your-powershell-dsc-scripts/ |
This is a great start! Thanks for sharing. This will at least allow me to quickly filter out what I need. What it doesn't solve though is when I need only 100 groups out of 100,000. Run time will still be horrific but I can at least filter afterwards. My main goal with the filter was to reduce run time of the source query against really large tenants. |
Just a few thoughts on this topic on how we could add this functionality: Basically, we would need a further parameter for @{
AADConditionalAccessPolicy = 'DisplayName -like "SubCompany*""'
O365Group = 'PrimarySMTPAddress -match "domainname.com"'
} We would need to pass this parameter to Microsoft365DSC/Modules/Microsoft365DSC/Modules/M365DSCReverse.psm1 Lines 417 to 426 in 0c00b6f
If the resource allows filtered exports, we could pick the matching object out of the hash table and then generate a limited export of this resource. This would not be a breaking change. @NikCharlebois Do you see any obstacles with this idea? |
I am way late to the game. Apologies folks. This is actually a great suggestion @andikrueger and I've been spending the past hour working on this with very promising results. This is exciting to finally have a sustainable way to specify resource level filters. My plan is to have this available (with a small subset of resources supporting it) for next week's release. |
Fixes #1691 - Advanced filtering
Description
I have used Microsoft365DSC so far on two projects to dump the configuration prior to importing it into a new tenant. Both of these projects were divestitures, so I was only interested in a sub-set of the source tenant. I would like a way to filter inside some of the configuration items. For example:
Proposed properties
Special considerations or limitations
I understand this would take a lot of work but it would be essential for getting to a no-code way of exporting and importing it without having to filter through the files manually.
The text was updated successfully, but these errors were encountered: