netserverenum or something similar 
Author Message
 netserverenum or something similar

What I am trying to accomplish is to query the domain for all computer
accounts and then filter out everything but workstations. I am able to query
the whole domain, but I have not found a way to distinguish a server from a
workstation. I have a code sample that uses the registry to determine if a
machine is a workstation or server and if I have to, I will resort to using
that. But what I would like to use is to use NetServerEnum or somthing
similar in VBScript. I have found some sample code that calls NetServerEnum
within VB, but I am not sure how to adapt this to VBScript. What do I need
to bind with to open up NetServerEnum to get a listing of all workstations.
Once I have this code, I could then use it to determine all the SQL servers
or Terminal Servers, etc. I am running the script from an XP or 2K
workstation and I am querying NT4, 2K, and XP clients. Any help that can be
provided would be greatly appreciated.

Charles J. Palmer
MCSE+I, MCSE(2K)



Tue, 22 Feb 2005 20:11:53 GMT  
 netserverenum or something similar
Hi,
You will have to pack your sample VB function into a COM object. And then call it binding object with "CreateObject" or
"GetObject" within Vbscript..
Ideal function should take a domain name and optionally type of query constant (server workst...) and return a collection. I guess
you know the side effect of  NetServerEnum is that collection reflects a current browser list.

Regards,
--
Gurgen Alaverdian
http://www.gurgensvbstuff.com

Quote:
> What I am trying to accomplish is to query the domain for all computer
> accounts and then filter out everything but workstations. I am able to query
> the whole domain, but I have not found a way to distinguish a server from a
> workstation. I have a code sample that uses the registry to determine if a
> machine is a workstation or server and if I have to, I will resort to using
> that. But what I would like to use is to use NetServerEnum or somthing
> similar in VBScript. I have found some sample code that calls NetServerEnum
> within VB, but I am not sure how to adapt this to VBScript. What do I need
> to bind with to open up NetServerEnum to get a listing of all workstations.
> Once I have this code, I could then use it to determine all the SQL servers
> or Terminal Servers, etc. I am running the script from an XP or 2K
> workstation and I am querying NT4, 2K, and XP clients. Any help that can be
> provided would be greatly appreciated.

> Charles J. Palmer
> MCSE+I, MCSE(2K)



Thu, 24 Feb 2005 11:24:53 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. netserverenum or something similar

2. How to get PWS or something similar owning WinXP Home Ed.

3. I had done something similar for MSI files it should help

4. Does Access have something similar to FSO?

5. Help needed with LASTUPDATED (or something similar)

6. ADO : Query too complex (or something similar!)

7. Is there something similar to CurrentUser() in Access?

8. DHTML application, how to use timer or something similar

9. Creating Dynamic Controls (or something similar)

10. date in Text Box or something similar

11. Looking for something similar to the VC++ list control

12. DHTML application, how to use timer or something similar

 

 
Powered by phpBB® Forum Software