If you look at device manager you can see what you can disable/enable but no PC I've seen lets me do this in say Windows on specific ports. I have seen desktops with BIOS settings to disable/enable some ports but no script was ever made to configure when Windows was running.

I'm going with there is no such thing.

Take a step back and tell why this is needed and maybe it's time to use USB locks?