So to finish off the thread, the code would look something like:

(untested)
 Code:
$OU="OU of computers"
$OUfilter="computer"
for each $pc in ListOUObjects($OU,$OUfilter)
  if osping($PC)
    $rc=fnwmishutdown($PC,1)
  endif
next



ListOUObjects - http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=205644
OSPing - http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=156097
fnWMIShutdown - http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=83746

How to use UDFs -
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=81943#Post81943

The rest of the UDFs are here -
http://www.kixtart.org/forums/ubbthreads.php?ubb=postlist&Board=7&page=1