I'd go with:

Function RemoteAdmin($computer)
$_=dir('\\'+$computer+'\admin$$')
$remoteAdmin=iif(not @error,1,0)
endfunction

It is always possible that someone had been given perms to c$, but not as likely for admin$
_________________________
How to ask questions the smart way <-----------> Before you ask