Freigeben über


IComputerTarget.GetInventory Method (String )

 

Applies To: Windows Server Update Services

Gets the inventory items for this computer. Windows Management Instrumentation (WMI) is used to create the hardware inventory. The configuration file, InventoryRules.xml, lists the WMI classes and the specific properties used. The configuration file is signed and cannot be altered.

Namespace:   Microsoft.UpdateServices.Administration
Assembly:  Microsoft.UpdateServices.Administration (in Microsoft.UpdateServices.Administration.dll)

Syntax

ReadOnlyCollection<IInventoryItem> GetInventory(
    string[] inventoryClasses
)
ReadOnlyCollection<IInventoryItem^>^ GetInventory(
    array<String^>^ inventoryClasses
)
abstract GetInventory : 
        inventoryClasses:string[] -> ReadOnlyCollection<IInventoryItem>
Function GetInventory (
    inventoryClasses As String()
) As ReadOnlyCollection(Of IInventoryItem)

Parameters

  • inventoryClasses
    Type: System.String[]

    WMI classes corresponding to inventory items.

Return Value

Type: System.Collections.ObjectModel.ReadOnlyCollection<IInventoryItem>

A collection of IInventoryItem objects, of the types specified in inventoryClasses, that are present on this computer. Returns an empty list if passed an empty array.

Exceptions

Exception

Condition

ArgumentNullException

inventoryClasses is null.

Remarks

The following table lists the WMI classes and properties used in hardware inventory collection. Note that this method was not designed and tested to scale beyond a few hundred computers and using it for large scale inventory purposes is neither supported nor recommended.

WMI Classes

Properties

Win32_Processor

DeviceID

Architecture

MaxClockSpeed

Name

Win32_BIOS

Name

Version

Manufacturer

ReleaseDate

Win32_PCMCIAController

DeviceID

Name

Manufacturer

Description

Win32_OperatingSystem

Name

BuildNumber

Caption

OSProductSuite

OSLanguage

OtherTypeDescription

ProductType

SerialNumber

ServicePackMajorVersion

ServicePackMinorVersion

Win32_DiskDrive

DeviceID

Name

Caption

Manufacturer

Model

InterfaceType

Partitions

size

Win32_LogicalDisk

DeviceID

Name

DriveType

VolumeName

FileSystem

Size

FreeSpace

Win32_NetworkAdapterConfiguration

Index

Caption

Description

DHCPEnabled

DHCPLeaseExpires

DHCPLeaseObtained

DHCPServer

DNSDomain

DNSEnabledForWINSResolution

DNSHostName

DomainDNSRegistrationEnabled

IPAddress

IPFilterSecurityEnabled

IPPortSecurityEnabled

WINSEnableLMHostsLookup

WINSHostLookupFile

WINSPrimaryServer

WINSScopeID

WINSSecondaryServer

Win32_NetworkAdapter

DeviceID

Index

Name

Caption

Description

Manufacturer

ProductName

MACAddress

Speed

MaxSpeed

NetConnectionStatus

NetConnectionID

Win32_SoundDevice

DeviceID

Name

Manufacturer

Win32_VideoController

DeviceID

Description

AdapterRAM

DriverDate

VideoModeDescription

Win32_DesktopMonitor

DeviceID

Name

MonitorManufacturer

PixelsPerXLogicalInch

PixelsPerYLogicalInch

ScreenHeight

ScreenWidth

Win32_ComputerSystem

Name

Manufacturer

Model

TotalPhysicalMemory

Win32_Printer

DeviceID

Name

Local

Network

Location

Comment

DriverName

Shared

ShareName

In addition to the WMI classes listed above, the following class (which is not an actual WMI class) is available. It represents details available from the Add/Remove programs applet.

Class

Properties

WsusInternal_ARP

DisplayName

DisplayVersion

ProductID

Publisher

Language

See Also

GetInventory Overload
IComputerTarget Interface
Microsoft.UpdateServices.Administration Namespace

Return to top