Hi @Aran Billen ,
Root Element Missing when connecting to SharePoint online via CSOM/Powershell on windows 10 machine.
There are two possibilities to cause this problem:
1.This is a known issue specific to the particular machine where you are executing this code. In order to fix this issue, need to change the IPV4 DNS setting in your machine.
2.IPV6 enabled will cause this error. Disabling IPV6.
For more detail steps,Please refer to this article: https://learn.microsoft.com/en-us/answers/questions/238229/powershell-error-root-element-is-missing
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.