Set specific USB ports to charge-only [duplicate]

On Windows, is there any way to make some USB ports to be charge-only? I do not want to alter the settings of the devices; I want to change the settings of the USB ports on Windows, so that any device I connect to those ports will be only charged.

Is this possible?


Run compmgmt.msc in Run prompt or command prompt.

This will open Computer Management window. Go to Device Manager section in Computer management.

At the bottom of of the list of devices... USB Devices is one of them. Select the USB device and disable it. You may not know which device in that list corresponds to which USB port, it needs some trail and error. Once you disable it, you can only use that port for power charging. Disable USB