If you list all the accounts in your domain, the workstation accounts will all end 
with a dollar
sign. I have used that method to get a list of worklststions on a domain. 

--Chuck

--- Mathew Shember <[EMAIL PROTECTED]> wrote:
> Type_ALL is as the name implies.  Everything.  So If you have win9x, 
> me,  They will get counted as well.
> 
> You could change it to SV_TYPE_NT.    This does list 2000 and XP machines.
> 
> Other things to watch.
> 
> Samba servers will appear.
> Network Appliance boxes will appear.
> 
> 
> Finally, keep in mind.  You are scanning the domain list which holds any 
> machine account that is created.   If you never remove dead accounts, they 
> are listed as well.
> 
> At 11:05 AM 4/1/2002 -0500, Rick Coloccia wrote:
> >Everyone,
> >
> >Maybe someone has some experience doing what I'm trying to do:
> >
> >I am in a mixed windows 2000 domain (not native mode, there are still nt4 
> >boxes, etc, around.)
> >
> >When I go into the Active Directory Users and Computers application and 
> >view all the computers I have, I see that there are 727 objects (NT4, W2k, 
> >WinXP machines).
> >
> >
> >I want to use perl to create that list somehow. When I run the code I have 
> >below, I get 280 computers.  I suspect that the filter I'm using 
> >(SV_TYPE_ALL) is at fault, but I can't seem to find anything more 
> >appropriate.  Does anyone have any suggestions?
> >
> >Thanks!
> >
> >-Rick
> >
> >
> >
> >use Win32::NetAdmin;
> >
> >$count=0;
> >
> >Win32::NetAdmin::GetServers(undef, "GENESEO", SV_TYPE_ALL, \%all_server_ref);
> >
> >foreach $server (keys(%all_server_ref)) {print "$server\n"; $count++; }
> >
> >print $count;
> >
> >


__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - send holiday greetings for Easter, Passover
http://greetings.yahoo.com/
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to