#Lists all servers of the type SV_TYPE_NT that are visible in the domain testdomain. The command will #be executed on \\\\testserver. use win32::Lanman; if(!Win32::Lanman::NetServerEnum("\\\\SERVEUR", "domaine", SV_TYPE_ALL, \@info)) { print "Sorry, something went wrong; error: "; # get the error code print Win32::Lanman::GetLastError(); exit 1; } foreach $server (@info) { @keys = keys %$server; foreach $key(@keys) { print "$key=${$server}{$key}\n"; } }