# CMS_RemoveHardwareInventory

> Removes a HardwareInventory row from the database that is persistent.

Source: https://docs.capaone.com/capainstaller/vb-scripting-library/cms-functions/cms-removehardwareinventory/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

### Description

Removes a HardwareInventory row from the database that is persistent.

### Syntax

**VBScript**

```vb
CMS_RemoveHardwareInventory(category, entry)
```

**PowerShell**

```powershell
[bool] CMS_RemoveHardwareInventory -category <string> -entry <string>
```

### Parameters

#### category (String)

Category name

#### entry (String)

variable name

### Return value

Boolean, TRUE if function completed successfully.

### Example

**VBScript**

```vb
If bStatus Then bStatus = CMS_RemoveHardwareInventory("BIOS Information", "Socket type")
If bStatus Then bStatus = CMS_RemoveHardwareInventory("Sound Adapter", "SoundBlaster compatiple")
```

**PowerShell**

```powershell
CMS_RemoveHardwareInventory 'BIOS Information' 'Socket type'
CMS_RemoveHardwareInventory -category 'Sound Adapter' -entry 'SoundBlaster compatiple'
if (CMS_RemoveHardwareInventory 'Sound Adapter' 'SoundBlaster compatiple') {
  $cs.Job_WriteLog("Removed", "SoundBlaster flag removed from Hardware inventory")
}
```

[Scripting Guidelines](/capainstaller/vb-scripting-library/scripting-guidelines/)

### Related functions

[CMS_AddHardwareInventory](/capainstaller/vb-scripting-library/cms-functions/cms-addhardwareinventory/) [Constants](/capainstaller/vb-scripting-library/addendum/constants/) [Package Property](/capainstaller/vb-scripting-library/addendum/package-property/) [Variables](/capainstaller/vb-scripting-library/addendum/variables/) [Business Unit support](/capainstaller/vb-scripting-library/addendum/business-unit-support/)
