Skip to content
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

Assert-M365DSCBlueprint: Add support to exclude resources from being compared #3262

Merged
merged 7 commits into from
May 3, 2023

Conversation

ricmestre
Copy link
Contributor

Pull Request (PR) description

When running Assert-M365DSCBlueprint one might want to just compare policies and not content resources such as AADUser, AADGroup, SPOSite, etc. This PR adds a new parameter to the function which allows to exclude certain types of resources from the report.

As an example these resources could be excluded from being compared:

$ExcludedResources = @($Global:DefaultComponents, $Global:FullComponents)

Additionally the function now throws an exception if ConvertTo-DSCObject fails, this is based on the issue #3259 I raised a couple of hours ago.

@ricmestre ricmestre requested a review from NikCharlebois as a code owner May 2, 2023 15:58
@NikCharlebois
Copy link
Collaborator

Would it also make sense to add support for it in the New-M365DSCDeltaReport while we're at it?

@ricmestre
Copy link
Contributor Author

Sure, just added support for it on both New-M365DSCDeltaReport and Compare-M365DSCConfigurations.

@NikCharlebois NikCharlebois merged commit 779a4b3 into microsoft:Dev May 3, 2023
NikCharlebois added a commit that referenced this pull request May 3, 2023
ExcludedResources: Document newly added parameter added on #3262
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants