Can anyone please help me figure out what is missing from this Microsoft
documentation?
1) Reference:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adsi/adsi/iadscomputer.asp
I have worked through the fact that the LDAP ADSI provider does not support
the IADsComputer interface; the documentation claims that "The IADsComputer
interface is not implemented by the LDAP ADSI provider".
However the properties "OperatingSystem" and "OperatingSystemVersion" *are*
available. Why?.
2) Reference:
http://msdn.microsoft.com/library/en-us/adsi/adsi/provider_support_of_adsi_interfaces.asp
Now, this is a great page because it summarises the fact that in order to
get the other IADsComputer methodes and properties, we need to use the WinNT
provider, which is detailed at this page:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adsi/adsi/adsi_objects_of_ldap.asp
The documentation at this page does not clearly indicate whether the WinNT
provider is connecting to the actual physical computer or Active Directory
with the WinNT://<domain name>/<server> ADsPath string. Which is it?
3) Using the WinNT provider, the properties documented at this page (
http://msdn.microsoft.com/library/en-us/adsi/adsi/iadscomputer.asp ) are
supposed to be available, but they are NOT.
This has me very puzzled; I have checked the "Requirements" but find nothing
missing. I have been through the docs time & time again, but something is
missing! See below...
Example:
Set oADSystem = GetObject
("LDAP://DC001/CN=MYSVR,OU=domain_servers,dc=contoso,dc=msft")
Wscript.Echo "Active Directory Attributes"
Wscript.Echo "ADsPath:" & oADSystem.ADsPath
Wscript.Echo "Class:" & oADSystem.Class
Wscript.Echo "OperatingSystem:" & oADSystem.OperatingSystem
Wscript.Echo "OperatingSystemVersion:" & oADSystem.OperatingSystemVersion
Wscript.Echo
Set oPhSystem = GetObject ("WinNT://contoso.msft/MYSVR,Computer")
Wscript.Echo "Physical Machine Attributes"
Wscript.Echo "Name:" & oPhSystem.Name
Wscript.Echo "Model:" & oPhSystem.Model
Result:
Active Directory Attributes
ADsPath:LDAP://DC001/CN=MYSVR,OU=domain_servers,dc=contoso,dc=msft
Class:computer
OperatingSystem:Windows Server 2003
OperatingSystemVersion:5.2 (3790)
Physical Machine Attributes
Name:MYSVR
E:\Temp\adaudit\test.vbs(11, 1) Active Directory: The directory property
cannot be found in the cache.
(I have a hrd time believing the the server does not have a "Model"
attribute. Same error for the other properties: MemorySize, Processor,
ProcessorCount, StorageCapacity, etc.)
What am I missing? Anyone?
Thanks in advance
--Maarten Veerman