---
title: "Remove-DbaDbDataClassification"
description: "Removes data classification labels from SQL Server table columns"
url: "https://dbatools.io/Remove-DbaDbDataClassification/"
availability: "Windows, Linux, macOS"
tags: ["DataClassification", "Classification", "Compliance", "Security"]
author: "the dbatools team + Claude"
source: "https://github.com/dataplat/dbatools/blob/master/public/Remove-DbaDbDataClassification.ps1"
last_updated: "2024-01-01"
---

# Remove-DbaDbDataClassification

## Synopsis

Removes data classification labels from SQL Server table columns

## Description

Removes all data classification metadata from table columns by dropping the four extended properties:  
- sys_information_type_id  
- sys_information_type_name  
- sys_sensitivity_label_id  
- sys_sensitivity_label_name  
  
Accepts piped input from Get-DbaDbDataClassification, making it easy to remove classifications  
from specific columns or bulk-remove classifications across databases.  
  
Requires SQL Server 2005 or later due to use of sp_dropextendedproperty.

## Syntax

```powershell
Remove-DbaDbDataClassification
    [-InputObject] <PSObject[]>
    [-EnableException]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

```

## Examples

### Example 1: Removes all data classifications from the AdventureWorks database

```powershell
PS C:\> Get-DbaDbDataClassification -SqlInstance sql2019 -Database AdventureWorks | Remove-DbaDbDataClassification
```

### Example 2: Removes data classifications from all classified columns in the Customer table without prompting

```powershell
PS C:\> Get-DbaDbDataClassification -SqlInstance sql2019 -Database AdventureWorks -Table Customer | Remove-DbaDbDataClassification -Confirm:$false
```

### Example 3: Removes only classifications with the &quot;General&quot; sensitivity label from AdventureWorks

```powershell
PS C:\> Get-DbaDbDataClassification -SqlInstance sql2019 -Database AdventureWorks | Where-Object SensitivityLabel -eq "General" | Remove-DbaDbDataClassification
```

### Required Parameters

##### -InputObject

Accepts classification objects piped from Get-DbaDbDataClassification.

| Property | Value |
| --- | --- |
| Alias |  |
| Required | True |
| Pipeline | true (ByValue) |
| Default Value |  |

### Optional Parameters

##### -EnableException

By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.  
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.  
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.

| Property | Value |
| --- | --- |
| Alias |  |
| Required | False |
| Pipeline | false |
| Default Value | False |

##### -WhatIf

Shows what would happen if the command were to run. No actions are actually performed.

| Property | Value |
| --- | --- |
| Alias | wi |
| Required | False |
| Pipeline | false |
| Default Value |  |

##### -Confirm

Prompts you for confirmation before executing any changing operations within the command.

| Property | Value |
| --- | --- |
| Alias | cf |
| Required | False |
| Pipeline | false |
| Default Value |  |

## Outputs

**PSCustomObject**

**Returns one object per successfully processed column with these properties:**

- ComputerName: The computer name of the SQL Server instance
- InstanceName: The SQL Server instance name
- SqlInstance: The full SQL Server instance name
- Database: The database name
- Schema: The schema of the table
- Table: The table name
- Column: The column name
- Status: The result of the removal operation

---

Part of [dbatools](https://dbatools.io/), a free and open source PowerShell module for SQL Server administration. Full command index: https://dbatools.io/commands/
