My two thoughts are that: 1) I would add a method to the Win32Admin.DLL that would query the sever for the number of connections or list of accounts connected to the share. Or 2) I would replace your entire script with an executable that would accept command line parms and do your task end to end.
_________________________
Home page: http://www.kixhelp.com/hb/