WinNT

ADSI WinNT provider.

Computer objekt

Computer objektet består af forskelling interfaces, som tilsammen repræsenterer objektet.

I stedet for at lave en table med interfacets attributter og et eksempel, har jeg lavet ét samlet script (JScript), som jeg håber viser interfacet.
De udkommenterede linjer er for attributter, som ikke kunne findes på en maskine i en arbejdsgruppe.

var objComputer = GetObject( "WinNT://myComputer, computer" );
var strComputer = "AdsPath = " + objComputer.AdsPath + "\n";
strComputer += "Class = " + objComputer.Class + "\n";
//strComputer += "ComputerID = " + objComputer.ComputerID + "\n";
//strComputer += "Department = " + objComputer.Department + "\n";
//strComputer += "Description = " + objComputer.Description + "\n";
strComputer += "Division = " + objComputer.Division + "\n";
strComputer += "GUID = " + objComputer.GUID + "\n";
//strComputer += "Location = " + objComputer.Location + "\n";
//strComputer += "MemorySize = " + objComputer.MemorySize + "\n";
//strComputer += "Model = " + objComputer.Model + "\n";
strComputer += "Name = " + objComputer.Name + "\n";
//strComputer += "NetAddresses = " + objComputer.NetAddresses + "\n";
strComputer += "OperatingSystem = " + objComputer.OperatingSystem + "\n";
strComputer += "OperatinSystemVersion = " + objComputer.OperatinSystemVersion + "\n";
strComputer += "Owner = " + objComputer.Owner + "\n";
strComputer += "Parent = " + objComputer.Parent + "\n";
//strComputer += "PrimaryUser = " + objComputer.PrimaryUser + "\n";
strComputer += "Processor = " + objComputer.Processor + "\n";
strComputer += "ProcessorCount = " + objComputer.ProcessorCount + "\n";
//strComputer += "Role = " + objComputer.Role + "\n";
strComputer += "Schema = " + objComputer.Schema + "\n";
//strComputer += "Site = " + objComputer.Site + "\n";
//strComputer += "StorageCapacity = " + objComputer.StorageCapacity + "\n";

WScript.Echo( strComputer );

Niels Grove-Rasmussen Opdateret 18-03-2019 01:25:45.
Ting Ta'r Tid! Hentet 21-11-2024 09:53:43.