jseerden / IntuneBackupAndRestore

PowerShell Module that queries Microsoft Graph, and allows for cross-tenant Backup & Restore actions of your Intune Configuration.
MIT License
345 stars 102 forks source link

Fixed reuse of last encrypted value for non-encrypted fields. #63

Open kim-ln opened 2 years ago

kim-ln commented 2 years ago

Probably fixes https://github.com/jseerden/IntuneBackupAndRestore/issues/53

For non-encrypted fields (i.e. non-string), the field's value was never used. Instead, the (decrypted) value of the last encrypted field (i.e. string field) was used. Unsure what used to happen if the first field was non-encrypted, as I lack PowerShell experience and did not have time to test. Anyway, it works properly now.

kim-ln commented 2 years ago

@jseerden Hi John. I just saw that an older similar PR existed: https://github.com/jseerden/IntuneBackupAndRestore/pull/51 Forgive my impertinence, but I think my change is a lot simpler and to the point.