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

Compare-IntuneBackupDirectories fails for plicies with [] in the name (like Autopatch policies) #73

Open
ztrhgf opened this issue Sep 18, 2023 · 0 comments

Comments

@ztrhgf
Copy link
Contributor

ztrhgf commented Sep 18, 2023

Compare-IntuneBackupDirectories uses LIKE operator for searching the difference files, but when policy/file contains [xxx] in its name, search fails, because LIKE treats this as sort of wildcard instead of literally searching for the string as it is.

Solution is to use MATCH instead (-match [regex]::Escape($referenceJSONFileParentPath))

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

No branches or pull requests

1 participant