Skip to content

Adjust cert import method to bugfix MethodInvocationException#55

Open
fzmindcore wants to merge 2 commits intoykuijs:mainfrom
fzmindcore:main
Open

Adjust cert import method to bugfix MethodInvocationException#55
fzmindcore wants to merge 2 commits intoykuijs:mainfrom
fzmindcore:main

Conversation

@fzmindcore
Copy link

@fzmindcore fzmindcore commented Jan 20, 2026

Couple of minor bugfixes I ran into while setting this up for the first time in a test environment.

Adjust cert import method to bugfix MethodInvocationException: Exception calling "Import" with "1" argument(s): "X509Certificate is immutable on this platform. Use the equivalent constructor instead."

Unsure of exactly what causes this issue, PowerShell 5 vs 7/Core didn't seem to matter but this did fix it while I was setting things up.

Also excluded the license files from the tests since the pipeline would fail otherwise.

adjust cert import method to bugfix MethodInvocationException: Exception calling "Import" with "1" argument(s): "X509Certificate is immutable on this platform. Use the equivalent constructor instead."
Test fails due to the license files in both M365DSC repo's not being UTF8 with BOM. Exclude them from the tests instead.
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.

1 participant