# CMS_RemoveCustomInventory

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

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

### Description

Removes a CustomInventory row that is persistent from the database.

### Syntax

**VBScript**

```vb
CMS_RemoveCustomInventory(category, entry) as boolean
```

**PowerShell**

```powershell
[bool] CMS_RemoveCustomInventory -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_RemoveCustomInventory("Customer Inventory", "Install time packages")
If bStatus Then bStatus = CMS_RemoveCustomInventory("Bitlocker", "TPM Chip - Enabled")
If bStatus Then bStatus = CMS_RemoveCustomInventory("Bitlocker", "TPM Chip - Manufactured")
```

**PowerShell**

```powershell
CMS_RemoveCustomInventory 'Customer Inventory' 'Install time packages'
CMS_RemoveCustomInventory -category 'Bitlocker' -entry 'TPM Chip - Enabled'
if (CMS_RemoveCustomInventory 'Bitlocker' 'TPM Chip - Manufactured') {
  $cs.Job_WriteLog("Removed", "Bitlocker entry removed from Custom inventory")
}
```

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

### Related functions

[CMS_AddCustomInventory](/capainstaller/vb-scripting-library/cms-functions/cms-addcustominventory/) [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/)
