How do I find out why certain ports are excluded and delete the exclusion?

Solution 1:

It could be due to a Windows update or enabling Hyper-V (which I think was the cause for me).

https://dandini.wordpress.com/2019/07/15/administered-port-exclusions-blocking-high-ports/

I saved the script as a batch file, ran it and it resolved my issue.

It seems like you may be able to run the following command instead of the entire script:

reg add HKLM\SYSTEM\CurrentControlSet\Services\hns\State /v EnableExcludedPortRange /d 0 /f

https://superuser.com/questions/1579346/many-excludedportranges-how-to-delete-hyper-v-is-disabled