I think you need to better explain what it is you want to do. Off the top of my head, it sounds like you just need a list of computer names, which could be accessed via a text file, or ldap, etc, then add the share name to it, and check if it exists.

;psuedo code
 Code:
$computers= ;query ldap, load a text file
$share="shared"
for each $computer in $computers
  ? $computer + " : "
  if exist("\\" + $computer + "\" + $share)
    "found"
  else
    "not found"
  endif
next
_________________________
(... better days ahead)