Samsung S6 edge not connecting to Windows 10

A

AC Question

HELP!....I have a Samsung s6 edge and a Windows 10 HP laptop. The phone is no longer being detected by the laptop, when I plug it into any of the ports it just charges. The cable is OEM and brand new and I have Smart Switch. Sometimes it is detected and I'm able to transfer files, but most of the time it doesn't work. It works no problem on my Sony laptop running Windows 7. Does any one know what to do??