You can not enable or disable ports.
Ports are part of the computer Structure and without ports the computer does not work.
The term Closing or opening ports is really misleading.
Since the Ports are always available it gives an Avenue to ?Bad People? to use them through the Internet/Network.
As a result we developed software application that blocks TCP Network traffic to ports of our choice (this is usually one of the functions of software Firewall). It does not really closing the port it blocks it to TCP Traffic so it can be used unauthorized.
If you want a better control the TCP usage of ports you can use this program:
PortBlocker.
As far as Actual physical ports like a USB, Serial, etc., you can disable it in Windows Device Manager.
:sun: