8.8.1 IADsComputer

The IADsComputer interface is used to get and set the properties of the Computer object. The interface definition is as follows:

[ object, uuid(IID_IADsComputer), oleautomation, dual ]

interface IADsComputer: IADs

{

// Read-only properties.

[propget]

HRESULT ComputerID ([out, retval]BSTR *pbstrComputerID);

[propget]

HRESULT Site ([out, retval]BSTR *pbstrSite);

// Read/write properties.

[propget]

HRESULT Description ([out, retval]BSTR *pbstrDescription);

[propput]

HRESULT Description ([in]BSTR bstrDescription);

[propget]

HRESULT Location ([out, retval]BSTR *pbstrLocation);

[propput]

HRESULT Location ([in]BSTR bstrLocation);

[propget]

HRESULT PrimaryUser ([out, retval]BSTR *pbstrPrimaryUser);

[propput]

HRESULT PrimaryUser ([in]BSTR bstrPrimaryUser);

[propget]

HRESULT Owner ([out, retval]BSTR *pbstrOwner);

[propput]

HRESULT Owner ([in]BSTR bstrOwner);

[propget]

HRESULT Division ([out, retval]BSTR *pbstrDivision);

[propput]

HRESULT Division ([in]BSTR bstrDivision);

[propget]

HRESULT Department ([out, retval]BSTR *pbstrDepartment);

[propput]

HRESULT Department ([in]BSTR bstrDepartment);

[propget]

HRESULT Role ([out, retval]BSTR *pbstrRole);

[propput]

HRESULT Role ([in]BSTR bstrRole);

[propget]

HRESULT OperatingSystem ([out, retval]BSTR *pbstrOperatingSystem);

[propput]

HRESULT OperatingSystem ([in]BSTR bstrOperatingSystem);

[propget]

HRESULT OperatingSystemVersion ([out, retval]BSTR *pbstrOperatingSystemVersion);

[propput]

HRESULT OperatingSystemVersion ([in]BSTR bstrOperatingSystemVersion);

[propget]

HRESULT Model ([out, retval]BSTR *pbstrModel);

[propput]

HRESULT Model ([in]BSTR bstrModel);

[propget]

HRESULT Processor ([out, retval]BSTR *pbstrProcessor);

[propput]

HRESULT Processor ([in]BSTR bstrProcessor);

[propget]

HRESULT ProcessorCount ([out, retval]bstr *pbstrProcessorCount);

[propput]

HRESULT ProcessorCount ([in]bstr bstrProcessorCount);

[propget]

HRESULT MemorySize ([out, retval]bstr *pbstrMemorySize);

[propput]

HRESULT MemorySize ([in]bstr bstrMemorySize);

[propget]

HRESULT StorageCapacity ([out, retval]bstr *pbstrStorageCapacity);

[propput]

HRESULT StorageCapacity ([in]bstr bstrStorageCapacity);

[propget]

HRESULT NetAddresses ([out, retval]VARIANT *pvNetAddresses);

[propput]

HRESULT NetAddresses ([in]VARIANT vNetAddresses);

};

Property

Syntax

Description

ComputerID

String

Get the globally unique identifier assigned to each machine, which serves as the authoritative identifier.

Site

String

Gets the globally unique identifier identifying the site this machine was installed in. A site represents a physical region of good connectivity in a network.

Description

String

Gets and sets the description of this computer.

Location

String

Gets and sets the physical location of the machine where this machine is typically located.

PrimaryUser

String

Gets and sets the name of the contact person in case something needs to be changed on this machine.

Owner

String

Gets and sets the name of the person that typically uses this machine and has a license to run the installed software.

Division

String

Gets and sets the division (e.g. ORG) within a company that this computer belongs to.

Department

String

Gets and sets the department (e.g. OU) within a company that this computer belongs to.

Role

String

Gets and sets the role of this machine: for example, workstation, server, domain controller.

OperatingSystem

String

Gets and sets the name of the operating system used on this machine.

OperatingSystemVersion

String

Gets and sets the operating system version number.

Model

String

Gets and sets the make/model of this machine.

Processor

String

Gets and sets the type of processor.

ProcessorCount

String

Gets and sets the number of processors.

MemorySize

String

Gets and sets the size of RAM in MB.

StorageCapacity

String

Gets and sets the disk space in MB.

NetAddresses

List

Gets and sets an array of NetAddress fields that represent the binding information for an object. The NetAddress syntax is discussed in Chapter 6, "Object Extensions".