tags:

views:

23

answers:

1

Hi All,

I need all the computers in the WORKGROUP. I tried the

Dim objComputers
Set objComputers = GetObject("WinNT://WORKGROUP")

But it is Active Directory object. Is there any way to get the computers without WinNT://?

Thanks in advance

-Ganesh

A: 

Connect to the group object by using the full LDAP path.

Set objGroup = GetObject("LDAP://" & strGroupLDAP)

You can enumerate after with something like:

For Each strMachine In objGroup.Members

Refer to items by:

strMachine.Name or strMachine.samAccountName 

EDIT: I'm confused by your question now that I reread it, what is the problem, you can use winnt:// to bind to either the domain or a machine?

unrealtrip