MOTOBIT.COM - ASP upload, IIS utility Servers Property, read only of Domain class

Property, read only | Member of  UserManager.Domain | Changes | Purchase | Download

Description

Collection of servers that are visible in the specified domain.

Syntax

Set vServers = Domain.Servers

Returns

Servers - WindowsNT servers that are visible in the domain.

Examples

Enumerate domain servers, local groups on the servers and a group members

Option Explicit
Dim Domain, Server

'create a domain object
Set Domain = CreateObject("UserManager.Domain") 

'Enumerate servers in the domain
For Each Server In Domain.Servers
  ListGroupsOnServer Server
Next

'this sub lists all groups on one server
Sub ListGroupsOnServer(Server) 
  Dim Group, Member

  'Enumerate all local groups
  For Each Group In Server.LocalGroups

    'Print server and group name
    Wscript.Echo server.Name, group.Name

    For Each Member In Group.Members
      If IsObject(Member) Then
        Wscript.Echo " *", Member.Name
      Else
        Wscript.Echo " *", Member
      End If
    
  
    Next
  Next 
End Sub

Other links for Servers

Properties of Domain class

Groups, Name, PDC, Servers, Users

UserManager.Domain

Domain class.

UserManager

ActiveX UserManager is easy to use COM component with classes to create, delete and manage local and remote user accounts, groups, servers and domains in the Windows NT (2000/XP) environment. You can simple work with user accounts and groups from VBA, VBS/JS, ASP and T-SQL programming environment.

© 1996 - 2009 Antonin Foller, Motobit Software | About, Contacts | e-mail: info@pstruh.cz