Set-ClassificationColumnTag
Published 25 September 2019
Update column with the tags specified (with override).
Syntax
Set-ClassificationColumnTag [-Column] <Object> [-Category] <string> [[-Tags] <string[]>] [<CommonParameters>]
Description
Update column with the tags specified. Only one tag category will be updated. It removes any existing tags in that category on that column before assigning the given tags. Passing an empty array will remove all tags in that category on that column.
Parameters
-Column
<Object>
Column to update tags.
Aliases | None |
Required? | true |
Position? | 1 |
Default Value | None |
Accept Pipeline Input | True (ByValue) |
Accept Wildcard Characters | false |
-Category
<String>
Name of tag category e.g. "Sensitivity".
Aliases | None |
Required? | true |
Position? | 2 |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-Tags
<String[]>
Names of tags e.g. @("Confidential - GDPR") Can be used with multi tags e.g. @("GDPR", "HIPPA") Use empty array @() to remove all tags in that category on that column.
Aliases | None |
Required? | false |
Position? | 3 |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-ProgressAction
<ActionPreference>
{{ Fill ProgressAction Description }}
Aliases | None |
Required? | false |
Position? | named |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see http://technet.microsoft.com/en-us/library/hh847884.aspx.
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
-
None.
You cannot pipe input to this cmdlet.
Examples
-------------------------- EXAMPLE 1 --------------------------
$allColumns = Get-ClassificationColumn -instanceName "sqlserver\sql2016" -databaseName "WideWorldImporters" $emailColumns = $allColumns | Where-Object {$_.ColumnName -like "email"} $emailColumns | Set-ClassificationColumnTag -category "Sensitivity" -tags @("Confidential - GDPR") $emailColumns | Set-ClassificationColumnTag -category "Information Type" -tags @("Contact Info") $emailColumns | Set-ClassificationColumnTag -category "Treatment Intent" -tags @()
Updates all columns with name like email to "Sensitivity": "Confidential - GDPR" and "Information Type": "Contact Info" and removes all tags in "Treatment Intent" category.