I am just starting to feel out ZCM 10.2. I can use a net use script to map a drive just fine, but how do I un-map the drive when the app closes?

Zen7.5 made it so easy, but I am not sure how to, or if I can, destroy the drive mapping when the app is no longer in use. I don't want a bunch of drives mapped to network resources when the user doesn't actually need them.