Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Get-AzSqlDatabase `
-DatabaseName "Database01" `
| Clear-AzSqlDatabaseVulnerabilityAssessmentRuleBaseline `
-RuleId "VA2108" `
-AppliesToMaster
-RuleAppliesToMaster
```

## PARAMETERS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Get-AzSqlInstanceDatabase `
-Name "Database01" `
| Clear-AzSqlInstanceDatabaseVulnerabilityAssessmentRuleBaseline `
-RuleId "VA2108" `
-AppliesToMaster
-RuleAppliesToMaster
```

## PARAMETERS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Note that you need to run *Enable-AzSqlServerAdvancedDataSecurity* and *Update-A

### Example 1: Converts vulnerability assessment scan results and saves them to local disk
```powershell
Set-AzSqlServerVulnerabilityAssessmentSettings `
Update-AzSqlServerVulnerabilityAssessmentSetting `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-StorageAccountName "mystorage"
Expand All @@ -37,7 +37,7 @@ Start-AzSqlDatabaseVulnerabilityAssessmentScan `
-DatabaseName "Database01" `
-ScanId "myScan"

$convert_scan_results = Convert-AzSqlDatabaseVulnerabilityAssessmentScan`
$convert_scan_results = Convert-AzSqlDatabaseVulnerabilityAssessmentScan `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-DatabaseName "Database01" `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Start-AzSqlInstanceDatabaseVulnerabilityAssessmentScan `
-DatabaseName "Database01" `
-ScanId "myScan"

$convert_scan_results = Convert-AzSqlInstanceDatabaseVulnerabilityAssessmentScan`
$convert_scan_results = Convert-AzSqlInstanceDatabaseVulnerabilityAssessmentScan `
-ResourceGroupName "ResourceGroup01" `
-InstanceName "ManagedInstance01" `
-DatabaseName "Database01" `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ This command gets all long term retention backups for all databases (which may b

### Example 2: Get all backups for a location under a resource group
```powershell
Get-AzSqlDatabaseLongTermRetentionBackup -Location northeurope -ResourceGroup resourceGroup01
Get-AzSqlDatabaseLongTermRetentionBackup -Location northeurope -ResourceGroupName resourceGroup01
```

```output
Expand Down
4 changes: 2 additions & 2 deletions src/Sql/Sql/help/Get-AzSqlInstance.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ This command gets information about all instances within the instance pool "inst

### Example 6: Get all instances within an instance pool using instance pool resource identifier
```powershell
Get-AzSqlInstance -InstancePoolResourceIdentifier "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/instancePools/instancePool0"
Get-AzSqlInstance -InstancePoolResourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/instancePools/instancePool0"
```

```output
Expand Down Expand Up @@ -297,7 +297,7 @@ This command gets information about all instances within the instance pool "inst

### Example 7: Get a managed instance using its resource identifier
```powershell
Get-AzSqlInstance -ResourceIdentifier "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1"
Get-AzSqlInstance -ResourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1"
```

```output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ This command gets the short term retention policy for database01.

### Example 2
```powershell
Get-AzSqlInstanceDatabase -ResourceGroupName resourcegroup01 -InstanceName instance01 -DatabaseName database01 | Get-AzSqlInstanceDatabaseBackupShortTermRetentionPolicy
Get-AzSqlInstanceDatabase -ResourceGroupName resourcegroup01 -InstanceName instance01 -Name database01 | Get-AzSqlInstanceDatabaseBackupShortTermRetentionPolicy
```

```output
Expand Down
2 changes: 1 addition & 1 deletion src/Sql/Sql/help/Get-AzSqlInstanceKeyVaultKey.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ This command gets the Key Vault key with Id 'https://contoso.vault.azure.net/key
### Example 3: Using instance object
```powershell
$managedInstance = Get-AzSqlInstance -Name 'ContosoManagedInstanceName' -ResourceGroupName 'ContosoResourceGroup'
Get-AzSqlInstanceKeyVaultKey -ManagedInstance $managedInstance -KeyId 'https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901'
Get-AzSqlInstanceKeyVaultKey -Instance $managedInstance -KeyId 'https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901'
```

```output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ This command gets the TDE protector for the managed instance named ContosoManage
### Example 2: Using managed instance object
```powershell
$managedInstance = Get-AzSqlInstance -Name 'ContosoManagedInstanceName' -ResourceGroupName 'ContosoResourceGroup'
Get-AzSqlInstanceTransparentDataEncryptionProtector -Instance $managedInstance 'ContosoManagedInstanceName'
Get-AzSqlInstanceTransparentDataEncryptionProtector -Instance $managedInstance
```

```output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The Get-AzSqlServerTransparentDataEncryptionProtector cmdlet gets information ab

### Example 1: Get the Transparent Data Encryption (TDE) protector
```powershell
Get-AzSqlServerTransparentDataEncryptionProtector -ServerName 'ContosoServer' -ResourceGroup 'ContosoResourceGroup'
Get-AzSqlServerTransparentDataEncryptionProtector -ServerName 'ContosoServer' -ResourceGroupName 'ContosoResourceGroup'
```

```output
Expand Down
2 changes: 1 addition & 1 deletion src/Sql/Sql/help/Get-AzSqlSyncSchema.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ This command gets the sync schema for the hub database in the sync group syncGro

### Example 2: Get the sync schema for a hub database, and expand Tables
```powershell
Get-AzSqlSyncSchema -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "database01" -SyncGroupName "syncGroup01" | select -ExpandProperty Tables
Get-AzSqlSyncSchema -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "database01" -SyncGroupName "syncGroup01" | Select-Object -ExpandProperty Tables
```

```output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The **Remove-AzSqlDatabaseLongTermRetentionBackup** cmdlet deletes the backup sp

### Example 1: Delete a single backup with resource group
```powershell
Remove-AzSqlDatabaseLongTermRetentionBackup -Location northeurope -ServerName server01 -DatabaseName database01 -BackupName "601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000" -ResourceGrouName resourcegroup01
Remove-AzSqlDatabaseLongTermRetentionBackup -Location northeurope -ServerName server01 -DatabaseName database01 -BackupName "601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000" -ResourceGroupName resourcegroup01
```

```output
Expand Down
4 changes: 2 additions & 2 deletions src/Sql/Sql/help/Remove-AzSqlInstancePool.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The **Remove-AzSqlInstancePool** cmdlet removes an Azure SQL Instance pool.

### Example 1: Remove an instance pool
```powershell
Remove-AzSqlInstancePool -ResourceGroup resourcegroup01 -Name instancePool0
Remove-AzSqlInstancePool -ResourceGroupName resourcegroup01 -Name instancePool0
```

### Example 2: Remove an instance pool by its resource identifier
Expand All @@ -47,7 +47,7 @@ Remove-AzSqlInstancePool -ResourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxx

### Example 3: Remove an instance pool by an instance pool object
```powershell
Get-AzSqlInstancePool -ResourceGroup resourcegroup01 -Name instancePool0
Get-AzSqlInstancePool -ResourceGroupName resourcegroup01 -Name instancePool0
Remove-AzSqlInstancePool -InputObject $instancePool
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ BaselineResult : @( 'Principal1', 'db_ddladmin', 'SQL_USER', 'None') , @(
```powershell
Get-AzSqlDatabase -ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
| where {$_.DatabaseName -ne "master"} `
| Where-Object {$_.DatabaseName -ne "master"} `
| Set-AzSqlDatabaseVulnerabilityAssessmentRuleBaseline `
-RuleId "VA2108" `
-BaselineResult @( 'Principal1', 'db_ddladmin', 'SQL_USER', 'None') , @( 'Principal2', 'db_ddladmin', 'SQL_USER', 'None')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ This command sets the short term retention policy for database01 to 35 days.

### Example 2
```powershell
Get-AzSqlInstanceDatabase -ResourceGroupName resourcegroup01 -InstanceName server01 -DatabaseName database01 | Set-AzSqlInstanceDatabaseBackupShortTermRetentionPolicy -RetentionDays 35
Get-AzSqlInstanceDatabase -ResourceGroupName resourcegroup01 -InstanceName server01 -Name database01 | Set-AzSqlInstanceDatabaseBackupShortTermRetentionPolicy -RetentionDays 35
```

```output
Expand All @@ -69,7 +69,7 @@ This command sets the short term retention policy for database01 to 35 days via

### Example 3
```powershell
Set-AzSqlDeletedInstanceDatabaseBackup -ResourceGroupName "ContosoResourceGroup" -InstanceName "ContosoServer" -DatabaseName "DB1" | Set-AzSqlInstanceDatabaseBackupShortTermRetentionPolicy -RetentionDays 8
Get-AzSqlDeletedInstanceDatabaseBackup -ResourceGroupName "ContosoResourceGroup" -InstanceName "ContosoServer" -DatabaseName "DB1" | Set-AzSqlInstanceDatabaseBackupShortTermRetentionPolicy -RetentionDays 8
```

```output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Get-AzSqlInstanceDatabaseSensitivityRecommendation -ResourceGroupName resourceGr

### Example 3: Set information type and sensitivity label of a column in an Azure SQL Managed Instance database, using piping.
```powershell
Get-AzSqlInstanceDatabase -ResourceGroupName resourceGroup -InstanceName managedInstance -DatabaseName database | Set-AzSqlInstanceDatabaseSensitivityClassification -SchemaName schema -TableName table -ColumnName column -InformationType informationType -SensitivityLabel label
Get-AzSqlInstanceDatabase -ResourceGroupName resourceGroup -InstanceName managedInstance -Name database | Set-AzSqlInstanceDatabaseSensitivityClassification -SchemaName schema -TableName table -ColumnName column -InformationType informationType -SensitivityLabel label
```

## PARAMETERS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ BaselineResult : @( 'Principal1', 'db_ddladmin', 'SQL_USER', 'None') , @(
```powershell
Get-AzSqlInstanceDatabase -ResourceGroupName "ResourceGroup01" `
-InstanceName "ManagedInstance01" `
| where {$_.Name -ne "master"} `
| Where-Object {$_.Name -ne "master"} `
| Set-AzSqlInstanceDatabaseVulnerabilityAssessmentRuleBaseline `
-RuleId "VA2108" `
-BaselineResult @( 'Principal1', 'db_ddladmin', 'SQL_USER', 'None') , @( 'Principal2', 'db_ddladmin', 'SQL_USER', 'None')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Changing the TDE protector type will rotate the protector.

### Example 1: Set the Transparent Data Encryption (TDE) protector type to ServiceManaged
```powershell
Set-AzSqlServerTransparentDataEncryptionProtector -Type ServiceManaged -ServerName 'ContosoServer' -ResourceGroup 'ContosoResourceGroup'
Set-AzSqlServerTransparentDataEncryptionProtector -Type ServiceManaged -ServerName 'ContosoServer' -ResourceGroupName 'ContosoResourceGroup'
```

```output
Expand All @@ -39,7 +39,7 @@ This command updates a server's TDE protector type to Service Managed.

### Example 2: Set the Transparent Data Encryption protector type to Azure Key Vault
```powershell
Set-AzSqlServerTransparentDataEncryptionProtector -Type AzureKeyVault -KeyId 'https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901' -ServerName 'ContosoServer' -ResourceGroup 'ContosoResourceGroup'
Set-AzSqlServerTransparentDataEncryptionProtector -Type AzureKeyVault -KeyId 'https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901' -ServerName 'ContosoServer' -ResourceGroupName 'ContosoResourceGroup'
```

```output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The **Start-AzSqlDatabaseExecuteIndexRecommendation** cmdlet starts the workflow

### Example 1: Run an index recommendation
```powershell
Start-AzSqlDatabaseExecuteIndexRecommendation -ResourceGroup "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01" -IndexRecommendationName "INDEX_NAME"
Start-AzSqlDatabaseExecuteIndexRecommendation -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01" -IndexRecommendationName "INDEX_NAME"
```

This command runs an index recommendation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ NumberOfFailedSecurityChecks : 9
Get-AzSqlDatabase `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
| where {$_.DatabaseName -ne "master"} `
| Start-AzSqlDatabaseVulnerabilityAssessmentScan
| Where-Object {$_.DatabaseName -ne "master"} `
| Start-AzSqlDatabaseVulnerabilityAssessmentScan
```

```output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ NumberOfFailedSecurityChecks : 9
Get-AzSqlInstanceDatabase `
-ResourceGroupName "ResourceGroup01" `
-InstanceName "ManagedInstance01" `
| where {$_.Name -ne "master"} `
| Start-AzSqlInstanceDatabaseVulnerabilityAssessmentScan
| Where-Object {$_.Name -ne "master"} `
| Start-AzSqlInstanceDatabaseVulnerabilityAssessmentScan
```

```output
Expand Down
2 changes: 1 addition & 1 deletion src/Sql/Sql/help/Start-AzSqlSyncGroupSync.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The **Start-AzSqlSyncGroupSync** cmdlet starts a sync group synchronization.

### Example 1
```powershell
Start-AzSqlSyncGroupSync -SyncGroupName mysg [-ServerName] mysrv [-DatabaseName] mydb [-ResourceGroupName] myrg
Start-AzSqlSyncGroupSync -SyncGroupName mysg -ServerName mysrv -DatabaseName mydb -ResourceGroupName myrg
```

This command starts a round of synchronization for the sync group mysg.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The **Stop-AzSqlDatabaseExecuteIndexRecommendation** cmdlet stops the workflow t

### Example 1: Stop running an index recommendation
```powershell
Stop-AzSqlDatabaseExecuteIndexRecommendation -ResourceGroup "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01" -IndexRecommendationName "INDEX_NAME"
Stop-AzSqlDatabaseExecuteIndexRecommendation -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01" -IndexRecommendationName "INDEX_NAME"
```

This command stops running an index recommendation.
Expand Down
2 changes: 1 addition & 1 deletion src/Sql/Sql/help/Stop-AzSqlSyncGroupSync.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The **Stop-AzSqlSyncGroupSync** cmdlet stops a sync group synchronization.

### Example 1
```powershell
Stop-AzSqlSyncGroupSync -SyncGroupName mysg [-ServerName] mysrv [-DatabaseName] mydb [-ResourceGroupName] myrg
Stop-AzSqlSyncGroupSync -SyncGroupName mysg -ServerName mysrv -DatabaseName mydb -ResourceGroupName myrg
```

This command stops the synchronization which is ongoing for the sync group mysg.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ This command updated the Vulnerability Assessment settings on Database02 from th
```powershell
Get-AzSqlDatabase -ResourceGroupName "ResourceGroup01" `
-ServerName $"Server01" `
| where {$_.DatabaseName -ne "master"} `
| Where-Object {$_.DatabaseName -ne "master"} `
| Update-AzSqlDatabaseVulnerabilityAssessmentSetting `
-StorageAccountName "mystorage" `
-ScanResultsContainerName "vulnerability-assessment" `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ This command updated the Vulnerability Assessment settings on Database02 from th
```powershell
Get-AzSqlInstanceDatabase -ResourceGroupName "ResourceGroup01" `
-InstanceName $"ManagedInstance01" `
| where {$_.Name -ne "master"} `
| Where-Object {$_.Name -ne "master"} `
| Update-AzSqlInstanceDatabaseVulnerabilityAssessmentSetting `
-StorageAccountName "mystorage" `
-ScanResultsContainerName "vulnerability-assessment" `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Get-AzSqlInstanceVulnerabilityAssessmentSetting `
-InstanceName "ManagedInstance01" `
| Update-AzSqlInstanceVulnerabilityAssessmentSetting `
-ResourceGroupName "ResourceGroup02" `
-ManagedInstanceName "ManagedInstance02" `
-InstanceName "ManagedInstance02" `
```

```output
Expand Down