Tip: An alternative to shutting down a PC is to get to its CMD prompt and type:
net use * /delete
This disconnects all shares that it was setup to use.

You could also disconnect it from a single share. For example, to disconnect it from drive Y:
net use y: /delete