1. Easy Way
Given that your device is USB-powered, you can use a simple switch to cut only the VCC (+5V) line, and leave D-, D+, and GND connected.
Simple, effective, and your USB controller won't mind at all.
2. Easier Way
Don't waste your time with a switch at all. Buy a short USB extension cable and plug/unplug your microscope into that as required.
This is my preferred method ;-)
3. Proper (Hard) Way
Emulate the way USB plugs work in real life. So your switch needs to turn things OFF in this order:
- Disconnect D- and D+
- Disconnect VCC
- Disconnect GND
And vice-versa when turning ON:
- Connect GND
- Connect VCC
- Connect D- and D+
This is surely going over the top. Someone has made something similar already and provides good information. You could modify this project to suit.