MOTOBIT.COM - ASP upload, IIS utility Server Class, Member of UserManager

Member of  UserManager Use Server object | Changes | Purchase | Download

Description

Properties of servers, enumerating users, logon/logoff to the user administrator account.

Object model

Server - Properties of servers, enumerating users, logon/logoff to the user administrator account. (Item property, Returns one server from the collection.)
 
Groups - Contains methods and properties for enumerating groups. (Groups property, Collection of global groups)
 
 
Group - Object for managing local or global group. (Item property, Returns specified group from collection.)
 
   
GroupMembers - Contains methods for enumerating and selecting user accounts from the group. (Members property, Members that belongs to the group.)
 
     
User - Properties of the user account, and methods for creating, deleting and selecting users. (Item property, Returns one group member.)
 
     
 
RasUser - RAS privileges and call-back phone number for the user. (Ras property, Enables setting of the RAS privileges and call-back phone number for the user.)
 
     
 
Groups - Contains methods and properties for enumerating groups. (Groups property, Get a list of groups that an NT user belongs to .)
 
     
 
Groups - Contains methods and properties for enumerating groups. (LocalGroups property, List of local groups to which a specified user belongs.)
 
     
Group - Object for managing local or global group. (Item property, Returns one group member.)
 
Groups - Contains methods and properties for enumerating groups. (LocalGroups property, Collection of local groups objects)
 
Users - Collection of user accounts (Domain/Server accounts), (Users property, Collection of User objects from the server.)

Methods

GetAnyDCName Gets the name of any domain controller for a domain that is directly trusted by the server name.
GetDCName Returns the name of the Primary Domain Controller (PDC) for the specified domain
ChangePassword Changes password for the currently logged on user.
LogonUser Attempts to perform a user logon operation and impersonates a user. You specify the user with a user name and domain, and authenticate the user with a clear-text password.
RevertToSelf Terminates the impersonation of a client application (ASP script).
Select Selects the server.

Properties

CommentComment describing the server.
String, RW
ComputerNameA Unicode string containing the name of a server or the name of the computer.
String, RO
DomainThe domain to which the computer belongs.
Domain, RO
GroupsCollection of global groups
Groups, RO
LocalGroupsCollection of local groups objects
Groups, RO
LoggedOnUserName of the logged-on user
String, RO
NameName of the server
String, RO
ServersCollection of servers in the primary domain of server.
Servers, RO
TypeType of the server.
ServerTypes, RO
UsersCollection of User objects from the server.
Users, RO

Examples

ASP sample

<CENTER><H1>Add a New user account.</H1></CENTER>
<FORM>
UserName : <INPUT NAME=UserName> UserPassword : <INPUT Name=UserPassword><INPUT TYPE=SUBMIT>
</FORM>
<%
UN = Request("UserName")
If UN <> "" Then
	'Create Server object for Logon
	Set xServer = Server.CreateObject("UserManager.Server")

	'www service is usually running under account without Account operator rights.
	'Server object is used to logon to the account with the right.
	xServer.LogonUser "Administrator", ""

	'The next statements are executed under Administrator account. 
	'Add a new user
	Set User = xServer.Users.Add( UN, Request("UserPassword"))

	'Some comment for the user
	User.Comment = "User from ASP page, " & Now()

	Response.Write "User <B>" & UN & "</B> Added.<BR>"

	Response.Write "List of users :<BR>"

	'List all of server users.
	For Each User In xServer.Users
		Response.Write "<B>" & User.Name & "</B>, " & User.Comment & "<BR>"
	Next 

	'LogOff the Administrator
	xServer.RevertToSelf
End If
%>

Used in

User.Server, Users.Server, Group.Server, Groups.Server, GroupMembers.Server, Domain.PDC, Servers.Item

Other links for Server class

ActiveX UserManager classes

User, Users, Group, Server, Groups, GroupMembers, RasUser, Servers, Domain

ActiveX UserManager enums

UsersFilter, GroupAttributes, UserFlags, UserPrivileges, ServerTypes, LogonTypes, LogonProviders, OperatorPrivileges, RasPrivileges, SIDNameUse

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