Remove-​Azure​Rm​Sql​Database​Data​Masking​Rule

Removes a data masking rule from a database.

Syntax

Remove-AzureRmSqlDatabaseDataMaskingRule
      [-ResourceGroupName] <String>
      [-ServerName] <String>
      [-DatabaseName] <String>
      -ColumnName <String>
      [-Force]
      [-PassThru]
      -SchemaName <String>
      -TableName <String>
      [-Confirm]
      [-WhatIf]
      [<CommonParameters>]

Description

The Remove-AzureRmSqlDatabaseDataMaskingRule cmdlet removes a specific data masking rule from an Azure SQL database. You can remove a data masking rule by using the ResourceGroupName, ServerName, DatabaseName, and RuleId parameters to identify the rule that this cmdlet removes.

This cmdlet is also supported by the SQL Server Stretch Database service on Azure.

Examples

Example 1: Remove a database data masking rule

PS C:\>Remove-AzureRmSqlDatabaseDataMaskingRule -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01" -SchemaName "dbo" -TableName  "table1" -ColumnName "column1"

This command removes rule name Rule01 defined for the database Database01. The database is located on Server01 and assigned to resource group ResourceGroup01.

Required Parameters

-ColumnName

Specifies the name of the column targeted by the masking rule.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-DatabaseName

Specifies the name of the database.

Type:String
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

Specifies the name of the resource group to which the database is assigned.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-SchemaName

Specifies the name of a schema.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ServerName

Specifies the name of the server that hosts the database.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-TableName

Specifies the name of an Azure SQL table.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.Azure.Commands.Sql.Security.Model.DatabaseDataMaskingRuleModel

Outputs

Microsoft.Azure.Commands.Sql.Security.Model.DatabaseDataMaskingRuleModel