Hydro has asked for the wisdom of the Perl Monks concerning the following question:

I was wondering if any knows of a btter way besides piping the "net view /domain" and "net view /domain:[workgroup]" commands to a file to get the list of workgroups and client names/workgroup on a given network.


Jonathan Southwick
Allegheny College, Meadville, PA
jonathan.southwick@allegheny.edu

Replies are listed 'Best First'.
Re: Workgroup and Client Names
by PodMaster (Abbot) on Nov 11, 2003 at 16:55 UTC
    Maybe Win32::NetAdmin - manage network groups and users in perl

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

Re: Workgroup and Client Names
by meetraz (Hermit) on Nov 11, 2003 at 19:02 UTC
    The best way to do this is via the Win32::Lanman module. Specificially, NetServerEnum() will give you a list of machines, and there are other functions for enumerating domains/workgroups.