Inherited from
Applies to Objects
Computer
This is the primary Interface of the Computer object. You can use this interface to get properties of computers, like operating system, processor type, and so on.
Property/Method |
Description |
Gets the Security object for managing permissions for the Computer |
|
Gets the IP Address of the computer |
|
Gets the globally unique identifier (Ethernet-ID) assigned to each computer |
|
Department to which this computer belongs |
|
Gets and sets the Description of a computer |
|
Gets and sets the Division to which the computer belongs |
|
Returns TRUE if RelativeName is a valid Name of the given Class type |
|
Gets and sets the physical location of this computer |
|
Gets the size of RAM in MBs |
|
Gets the make or model of a computer |
|
Gets the binding information for the Computer |
|
Gets the name of the operating system used on a computer |
|
Gets the operating system version number |
|
Gets the name of the person that typically uses a computer and has a license to run the installed software |
|
Gets and sets the contact person for this computer |
|
Gets the type of processor |
|
Gets the number of processors |
|
Gets the role of a computer - whether it is a workstation, server, domain controller, and so on |
|
Gets the globally unique identifier identifying the site a computer is installed in. A site represents a physical region of good connectivity in a network |
|
Gets the size of disk space in MBs |
Example
This example demonstrates the use of IADsComputer Properties and
Methods.
Dim Computer As IADsComputer
'Bind to the known NT Computer object.
'MSFT is the domain name and Moon is the name of a computer in
MSFT.
Set Computer = GetObject("NTDS://MSFT/Moon")
'Debug.Print to print the name, Description etc. to the debug
window.
'you can use the Name property as IADsComputer is derived from
IADs.
'assume that the current value of Description is "Old
Description"
Debug.Print Computer.Name
Debug.Print Computer.Description 'prints Old Description
Debug.Print Computer.Owner
Debug.Print Computer.OperatingSystem
Debug.Print Computer.ComputerID
'Change the Description of the Computer.
'WARNING: This will change the value of the Description
property!!!
Computer.Description = "New Description"
Debug.Print Computer.Description 'prints New Description
Computer.GetInfo
Debug.Print Computer.Description 'prints Old Description
Computer.Description = "New Description"
'Call SetInfo to commit the changes to the network.
Computer.SetInfo
'Call GetInfo to get the new values.
Computer.GetInfo
'Display Description.
Debug.Print Computer.Description
'prints New Description