sanPerl has asked for the wisdom of the Perl Monks concerning the following question:
use Socket; use Win32::Lanman; Domains_im_Netz(); foreach $domain (@Domains) {Win32::Lanman::NetServerEnum( '', $domain, SV_TYPE_ALL, \@W1); foreach (@W1) {$hostname = ${$_}{'name'}; my $ip = gethostbyname($hostname); if ( defined $ip ) {print "$domain\t", inet_ntoa($ip), "\t $hostname\n";} } } sub Domains_im_Netz {# zeigt die Domainen im Netzwerk an use Win32::OLE; @Domains = (); $dom = Win32::OLE->GetObject("WinNT:"); foreach $AG (in $dom) {if ($AG->{Name} eq 'TRUMPF' ) {next;} push @Domains, $AG->{Name}; } } ## Domains_im_Netz # end code
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How can get all the terminal names/IP addresses connected to network
by marto (Cardinal) on Oct 18, 2005 at 09:47 UTC | |
|
Re: How can get all the terminal names/IP addresses connected to network
by g0n (Priest) on Oct 18, 2005 at 10:08 UTC | |
|
Re: How can get all the terminal names/IP addresses connected to network
by tirwhan (Abbot) on Oct 18, 2005 at 10:33 UTC | |
by davies (Monsignor) on Jan 08, 2006 at 20:18 UTC | |
by tirwhan (Abbot) on Jan 09, 2006 at 08:00 UTC | |
|
Re: How can get all the terminal names/IP addresses connected to network
by skx (Parson) on Oct 18, 2005 at 11:14 UTC | |
by nimdokk (Vicar) on Oct 18, 2005 at 15:40 UTC |