eneerge / CIS-Microsoft-Intune-For-Windows-IntuneProfile

37 stars 13 forks source link

Import breaks certain settings due to invalid seperator #8

Open nickscarpenter opened 4 months ago

nickscarpenter commented 4 months ago

Hi

i have noticed when importing that the seperator "" doesnt appear to pull through correctly and gets replaced with ""

image

thanks for the hard work! , shame it doesnt work on Windows 11 AVD multi-session hosts :(

eneerge commented 4 months ago

Hey nicksparpenter,

If you're making any changes to the configuration, make sure you save the file with UTF16 or UTF-8 with BOM encoding or it will replace that character as you mentioned. I had this exact same issue, but once I re-saved with the correct encoding, it fixed the issue. You may have to go back and do a replace-all to fix the bad chars. The  is the correct character. I certainly disagree with this being the character that has to be used, but that's what Microsoft decided to use.

I could probably upadate the configuration to use a keycode instead of relying on the encoding of the saved file. I will see if that's possible. But until then, try using the UTF BOM encoding

Let me know if this helps.

fatcat2248 commented 3 months ago

Same problem - wish I checked the issues first instead of inspecting the policies until I found where it was broken. :)

Great script - may be worth adding this 'Gotcha' to the Read Me as people are going to run into the same issue breaking the file by updating the Tenant-ID.