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

Add support for null CIM instances #60

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

ricmestre
Copy link
Contributor

CIM instances can be null nevertheless DSCParser seems never had support for it so this PR tries to fix it.

@FabienTschanz
Copy link
Contributor

I see, if I'm not mistaken this would fix a couple of issues over on the Microsoft365DSC repository.

@ricmestre
Copy link
Contributor Author

There are 2 issues there, one I don't know if this fixes it or not since the OP didn't provide any configuration [0] but for the other actually won't solve it [1]

[0] microsoft/Microsoft365DSC#5737
[1] microsoft/Microsoft365DSC#5711

I actually came up with this fix because I had a customer with a genuine issue on your IntuneDeviceRemediation resource where the RunSchedule was being exported as null but ConvertTo-DscObject just barfs with that error "ConvertTo-DSCObject: Unable to find type [Instance]"

@FabienTschanz
Copy link
Contributor

FabienTschanz commented Feb 11, 2025

I see. I found another issue here: microsoft/Microsoft365DSC#5715. I colleague of mine reported this issue to me, but I didn't quite understand why it exported it as $null (although now, it makes sense to me). Thank you 👍

Edit: The issue with [1] should be fixed with microsoft/Microsoft365DSC#5746. The export is corrupted.

@ricmestre
Copy link
Contributor Author

Yeah I saw your PR there and looks good to me.

But for #5715 would be good to see if that person could do an export from an older M365DSC version, this is because AADApplication was one of the resources where Nik refactored the CIM instances and I don't know if that's actually a genuine null instance like with my customer, or if it's an issue now exporting that resource.

@NikCharlebois NikCharlebois merged commit bfdadb6 into microsoft:master Feb 12, 2025
1 check passed
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.

3 participants