Run the script with a /F switch and it will flush the cached group memberships. This will of course only help if you are using group memberships to map the drives in the first place.