I work in a windows environment with active directory. Just logging out doesn't disconnect (unbind) the network drives. I need something more forceful, and faster than shutting down and restarting. Because if my mac awakes in another network without connection to the windows shares it gives me the spinning beach ball of death.
Are these shares automounted?
You could use AppleScript, or even bash quite effectively to do this using a Log Out Hook (or running manually):