Exchange PowerShell - For security reasons DTD is prohibited

Exchange PowerShell - For security reasons DTD is prohibited

·

1 min read

I was working from home today and was trying to connect to Exchange Online via PowerShell. However, every time I tried to connect I would get the following error:

System.Xml.XmlException: For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.

It was working fine in a RD session in the office but not at home. After a quick Google I saw a few other posts with people mentioning that it could be to do with your ISP. Some have a 'feature' called Advanced Network Error Search that will present a custom search page if a domain name cannot be resolved. That may be useful for some people but it turns out that was the culprit.

My ISP is Virgin Media and all I had to do was go here and change my selection to No - I would not like to use the advanced network error search. After a quick reboot of my modem everything was working!