IADsContainer Interface

Inherited from

IDispatch

IUnknown

Applies to Objects

Computer

Domain

File

NameSpace

RegistryKey

This is the primary interface for all Container Objects. You can use this interface to create, delete, copy, move, and enumerate contained objects. All container objects (listed above) support this interface. For example, you can create a Domain in the NameSpace object. Similarly, you can create a Computer, User or a Group in a Domain object, or create Local Groups and Local Users in a Computer.

Property/Method

Description

CopyHere

Creates a new object in a container identical to a specified object and returns a pointer to the new object. Copying objects across namespaces is not permitted

CopyHereEx

Creates a new user in a container identical to the specified user and returns a pointer to the new user. It also copies the user with permissions intact for only one File

CopyHereWithAllFilesPermissions

Creates a new user in a container identical to the specified user and returns a pointer to the new user. The user is copied with permissions intact for all files in the entire network. This method does not support the Computer object

CopyHereWithSelectedFilesPermissions

Creates a new user in a container identical to the specified user and returns a pointer to the new user. The user is copied with permissions intact for only specified ShareNames. This method does not support the Computer object

Count

Gets the number of DirectScript objects within a container

Create

Creates an object of the class specified by Class, of name RelativeName, and returns a pointer to the newly created object

Delete

Deletes the object identified by the provided class and relative name

Filter

Gets or sets the filter on the object classes that will be returned in a given enumeration. This property must be set for Domain, Computer, File and RegistryKey Containers and is not required for the NameSpace Container

GetObject

Returns the IADs interface of the item in the container identified by the object's class and relative name (this is the value of the object's IADs::Name property)

Hints

Gets the properties to load for each enumerated object

MoveHere

Moves a given object from a given source to a container. Note that this method is currently not supported for all objects

Example
This example helps you use IADsContainer to enumerate Group Objects in Container Objects like NameSpace, Domain, or Computer. Here the Container Object is a Computer.

Dim Group As IADsGroup
Dim ComputerContainer As IADsContainer
'Bind to the known NT Computer object and get a Container Interface on the Computer Object.
'Fill in the correct values for <DomainName> and <ComputerName>
Set ComputerContainer = GetObject("NTDS:// <DomainName>/<ComputerName>")
'Set the filter to "Group" for enumerating local groups in the computer.
ComputerContainer.Filter = "Group"
'Print the Count of groups in the specified computer.
Debug.Print ComputerContainer.Count
'Enumerate the groups in computer and print their Name and Description.
'Groups in a computer are local groups
For Each Group in ComputerContainer
 Debug.Print Group.Name
 Debug.Print Group.Description
Next Group


Объявления:
    • Evavargentine.by

      Получение пмж и гражданства через роды в аргентине evavargentine.by.

      evavargentine.by