# Get hardware inventory for unit

> Gets a list of hardware inventory for a specific unit.

Source: https://docs.capaone.com/capainstaller/sdk-capainstaller-software-development-kit-functions/inventory-functions/get-hardware-inventory-for-unit/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

## Description

Gets a list of hardware inventory for a specific unit.

## Syntax

GetHardwareInventoryForUnit(Byval UnitName as String, Byval UnitType as String) as ArrayList

## Parameters

*UnitName (String)*

Name or UUID of the unit to retrieve inventory for

*UnitType (String)*

Type of the unit

- "1" (Computer)
- "2" (User)

## Return value

The function returns an array of Hardware Inventory items. Each element (inv) in the array is a joined line with the character defined with [Set splitter](/capainstaller/sdk-capainstaller-software-development-kit-functions/container-functions/set-splitter/).

- inv.Category
- inv.Entry
- inv.Value
- inv.Datatype
- inv.GUID
- inv.ID

## Example

**VBScript**

```vb
Set oCMS = CreateObject("CapaInstaller.SDK") 
Set aUnit = CreateObject("System.Collections.ArrayList") 
wscript.echo oCMS.SetInstanceManagementPoint("1") 
Set aUnit =  oCMS.GetHardwareInventoryForUnit("Klient","1") 
for each item in aUnit 
  wscript.echo item 
next 
```
