Sorry it took so long to get back to you...  Here's some code you can use to
get started.  I use Win32::AdminMisc from Dave Roth's site (get his books
too if you don't have them) for this.  If you don't have it, use his PPM
Repository to get it. 

PPM> set repository dave http://www.roth.net/perl/packages

Now this is going to assume that you already have a list of the domains, but
it will get you started:

use strict;
use Win32::AdminMisc;

my @domains = qw(DOMAIN1 DOMAIN2 DOMAIN3);
foreach(@domains){
   print "Getting the list of servers for $_...\n";
   my @servers;
   Win32::AdminMisc::GetMachines($_,UF_SERVER_TRUST_ACCOUNT,\@servers);
   print "   Printing...\n\n";

   open(OUTFILE,">$_.txt");
   print OUTFILE "List of servers in $_ as of ".localtime()."\n";
   foreach my $srv(@servers){
      print OUTFILE "$srv\n";
   }
   close OUTFILE;
}

-----Original Message-----
From: Jarrod Ramsey [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 23, 2002 11:25 AM
To: 'Timothy Johnson'; Jarrod Ramsey;
[EMAIL PROTECTED]
Subject: RE: Dynamics


1)  The domain.  Sorry, I was thinking of this in Exchange terms.
2)  In that domain.

Jarrod Ramsey
ISD Messaging
479.277.4014
[EMAIL PROTECTED]
This e-mail is Wal-Mart confidential.


-----Original Message-----
From: Timothy Johnson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 23, 2002 1:04 PM
To: 'Jarrod Ramsey'; [EMAIL PROTECTED]
Subject: RE: Dynamics



Just to clarify:

1) When you say "Site", are  you referring to a physical location, subnet,
Active Directory container, Domain, etc.?
2) When you say that you want to dynamically get a list of servers, do you
mean the list of servers in that "Site", or the list of servers that are
online in that "Site".

-----Original Message-----
From: Jarrod Ramsey [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 23, 2002 11:06 AM
To: [EMAIL PROTECTED]
Subject: Dynamics


All,

I am wanting to dynamically get a list of servers from each Site in the
network.  This also means that I have to get all of the Sites dynamically.
I was doing it through an external program being called from my program, but
it eats up way to many resources.  Does anyone have an idea of a better way
I can do this through Perl code?

Also, is there any way to dynamically get the directory of where the program
is at?

Any help would be awesome.

Jarrod Ramsey


**********************************************************************
Notice:  The area code for the Wal-Mart Bentonville General 
Office in the US has changed from 501 to 479.  Please make
sure that you are dialing 479 when making calls to any 
General Office location.

**********************************************************************
This email and any files transmitted with it are confidential
and intended solely for the individual or entity to 
whom they are addressed.  If you have received this email
in error destroy it immediately.
**********************************************************************

_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


--------------------------------------------------------------------------------
This email may contain confidential and privileged 
material for the sole use of the intended recipient. 
If you are not the intended recipient, please contact 
the sender and delete all copies.
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to