Compartir a través de


Guía de migración para Az 3.0.0

En este documento se describen los cambios entre las versiones 2.0.0 y 3.0.0 de Az.

Batch

Get-AzBatchNodeAgentSku

  • Se ha quitado Get-AzBatchNodeAgentSku y se ha reemplazado por Get-AzBatchSupportedImage.
  • Get-AzBatchSupportedImage devuelve los mismos datos que Get-AzBatchNodeAgentSku, pero en un formato más amigable.
  • Ahora también se devuelven nuevas imágenes no verificadas. También se incluye información adicional sobre Capabilities y BatchSupportEndOfLife para cada imagen.

Antes

$Context = Get-AzBatchAccountKeys -AccountName "ContosoBatchAccount"
Get-AzBatchNodeAgentSku -BatchContext $Context

Después

$Context = Get-AzBatchAccountKey -AccountName "ContosoBatchAccount"
Get-AzBatchSupportedImage -BatchContext $Context

Incompatibilidad de versión anterior con el módulo Az.Resources

La versión 2.0.1 del módulo "Az.Batch" no es compatible con versiones anteriores (versión 1.7.0 o anterior) del módulo "Az.Resources". Esto provocará que no se pueda importar la versión 1.7.0 del módulo "Az.Resources" cuando se importe la versión 2.0.1 del módulo "Az.Batch". Para corregir este problema, basta con actualizar el módulo "Az.Resources" a la versión 1.7.1 o posterior, o simplemente instalar la versión más reciente del módulo "Az".

Calcular

New-AzDiskConfig

El parámetro UploadSizeInBytes se utiliza en lugar de DiskSizeGB para New-AzDiskConfig cuando CreateOption es "Upload".

Antes

$diskconfig = New-AzDiskConfig -Location 'Central US' -DiskSizeGB 1023 -SkuName Standard_LRS -OsType Windows -CreateOption Upload -DiskIOPSReadWrite 500 -DiskMBpsReadWrite 8

Después

$diskconfig = New-AzDiskConfig -Location 'Central US' -UploadSizeInBytes 1023 * 1024 * 1024 * 1024 -SkuName Standard_LRS -OsType Windows -CreateOption Upload -DiskIOPSReadWrite 500 -DiskMBpsReadWrite 8

HDInsight

Get-AzHDInsightJobOutput

  • Se ha actualizado el cmdlet Get-AzHDInsightJobOutput para admitir el acceso basado en roles pormenorizados a la clave de almacenamiento.
  • Los usuarios con roles de operador, colaborador o propietario de HDInsight no se verán afectados.
  • Los usuarios con solo el rol de Lector deberán explícitamente especificar el parámetro DefaultStorageAccountKey.

Antes

Get-AzHDInsightJobOutput  -ClusterName $clusterName -JobId $jobId

Después

Get-AzHDInsightJobOutput -ClusterName $clusterName -JobId $jobId -DefaultStorageAccountKey $storageAccountKey

Add-AzHDInsightConfigValues

Se ha quitado el alias del cmdlet Add-AzHDInsightConfigValue por Add-AzHDInsightConfigValues.

Antes

Uso de alias en desuso

Add-AzHDInsightConfigValues

Después

Add-AzHDInsightConfigValue

Disable-AzHDInsightMonitoring

Se ha agregado un nuevo cmdlet Disable-AzHDInsightMonitoring. Use este cmdlet para deshabilitar la supervisión en un clúster de HDInsight (reemplaza Disable-AzHDInsightOperationsManagementSuite y Disable-AzHDInsightOMS).

Antes

Disable-AzHDInsightOMS -Name testcluster
Disable-AzHDInsightOperationsManagementSuite -Name testcluster

Después

Disable-AzHDInsightMonitoring -Name testcluster

Enable-AzHDInsightMonitoring

Se ha agregado un nuevo cmdlet Enable-AzHDInsightMonitoring. Use este cmdlet para habilitar la supervisión en un clúster de HDInsight (reemplaza Enable-AzHDInsightOperationsManagementSuite y Enable-AzHDInsightOMS).

Antes

Enable-AzHDInsightOMS Enable-AzHDInsightMonitoring -Name testcluster -WorkspaceId 1d364e89-bb71-4503-aa3d-a23535aea7bd -PrimaryKey <key for workspace 1d364e89-bb71-4503-aa3d-a23535aea7bd>
Enable-AzHDInsightOperationsManagementSuite Enable-AzHDInsightMonitoring -Name testcluster -WorkspaceId 1d364e89-bb71-4503-aa3d-a23535aea7bd -PrimaryKey <key for workspace 1d364e89-bb71-4503-aa3d-a23535aea7bd>

Después

Enable-AzHDInsightMonitoring Enable-AzHDInsightMonitoring -Name testcluster -WorkspaceId 1d364e89-bb71-4503-aa3d-a23535aea7bd -PrimaryKey <key for workspace 1d364e89-bb71-4503-aa3d-a23535aea7bd>

Get-AzHDInsightMonitoring

Se ha agregado un nuevo cmdlet Get-AzHDInsightMonitoring. Use este cmdlet para obtener el estado de la instalación de supervisión en un clúster de Azure HDInsight (reemplaza Get-AzHDInsightOperationsManagementSuite y Get-AzHDInsightOMS).

Antes

Get-AzHDInsightOMS -Name testcluster
Get-AzHDInsightOperationsManagementSuite -Name testcluster

Después

Get-AzHDInsightMonitoring -Name testcluster

Get-AzHDInsightProperty

Se ha quitado el alias del cmdlet Get-HDInsightProperty por Get-AzHDInsightProperties.

Antes

Uso de alias en desuso

Get-AzHDInsightProperties -Location "East US 2"

Después

Get-AzHDInsightProperty -Location "East US 2"

Grant-AzHDInsightRdpServicesAccess

Se han eliminado los cmdlets Grant-AzHDInsightRdpServicesAccess y Revoke-AzHDInsightRdpServicesAccess. Estos ya no son necesarios porque no se admiten clústeres que usan el tipo de sistema operativo Windows. Cree un clúster utilizando el tipo de sistema operativo Linux en su lugar.

Remove-AzHDInsightCluster

El tipo de salida de Remove-AzHDInsightCluster cambió de Microsoft.Azure.Management.HDInsight.Models.ClusterGetResponse a bool.

Antes

$cluster = Remove-AzHDInsightCluster -ClusterName "your-hadoop-001"

Después

Remove-AzHDInsightCluster -ClusterName "your-hadoop-001" -PassThru
True

Revoke-AzHDInsightRdpServicesAccess

El cmdlet está en desuso. No hay reemplazo para ello.

Set-AzHDInsightGatewayCredential

El tipo de salida de Set-AzHDInsightGatewayCredential cambió de HttpConnectivitySettings a AzureHDInsightGatewaySettings.

IotHub

New-AzIotHubImportDevices

Este alias se quita, use New-AzIotHubImportDevice en su lugar.

Antes

New-AzIotHubImportDevices -ResourceGroupName "myresourcegroup" -Name "myiothub" -InputBlobContainerUri "https://mystorageaccount.blob.core.windows.net/mystoragecontainer?sv=2015-04-05&ss=bfqt&sr=c&srt=sco&sp=rwdl&se=2016-10-27T04:01:48Z&st=2016-10-26T20:01:48Z&spr=https&sig=QqpIhHsIMF8hNuFO%3D" -OutputBlobContainerUri "https://mystorageaccount.blob.core.windows.net/?sv=2015-04-05&ss=bfqt&sr=c&srt=sco&sp=rwdl&se=2016-10-27T04:01:48Z&st=2016-10-26T20:01:48Z&spr=https&sig=QqpIhHsIMF8hNuFO%3D"

Después

New-AzIotHubImportDevice -ResourceGroupName "myresourcegroup" -Name "myiothub" -InputBlobContainerUri "https://mystorageaccount.blob.core.windows.net/mystoragecontainer?sv=2015-04-05&ss=bfqt&sr=c&srt=sco&sp=rwdl&se=2016-10-27T04:01:48Z&st=2016-10-26T20:01:48Z&spr=https&sig=QqpIhHsIMF8hNuFO%3D" -OutputBlobContainerUri "https://mystorageaccount.blob.core.windows.net/?sv=2015-04-05&ss=bfqt&sr=c&srt=sco&sp=rwdl&se=2016-10-27T04:01:48Z&st=2016-10-26T20:01:48Z&spr=https&sig=QqpIhHsIMF8hNuFO%3D"

New-AzIotHubExportDevices

Este alias se quita, use New-AzIotHubExportDevice en su lugar.

Antes

New-AzIotHubExportDevices -ResourceGroupName "myresourcegroup" -Name "myiothub" -ExportBlobContainerUri "https://mystorageaccount.blob.core.windows.net/mystoragecontainer?sv=2015-04-05&ss=bfqt&sr=c&srt=sco&sp=rwdl&se=2016-10-27T04:01:48Z&st=2016-10-26T20:01:48Z&spr=https&sig=QqpIhHsIMF8hNuFO%3D" -ExcludeKeys

Después

New-AzIotHubExportDevice -ResourceGroupName "myresourcegroup" -Name "myiothub" -ExportBlobContainerUri "https://mystorageaccount.blob.core.windows.net/mystoragecontainer?sv=2015-04-05&ss=bfqt&sr=c&srt=sco&sp=rwdl&se=2016-10-27T04:01:48Z&st=2016-10-26T20:01:48Z&spr=https&sig=QqpIhHsIMF8hNuFO%3D" -ExcludeKeys

Add-AzIotHubEventHubConsumerGroup

El parámetro EventHubEndPointName está en desuso sin ser reemplazado, ya que IotHub incluye solo un punto de conexión integrado ("events") que puede gestionar los mensajes del sistema y del dispositivo.

Antes

Add-AzIotHubEventHubConsumerGroup -ResourceGroupName "myresourcegroup" -Name "myiothub" -EventHubConsumerGroupName "myconsumergroup" -EventHubEndpointName "/EventHubEndpointName"

Después

Add-AzIotHubEventHubConsumerGroup -ResourceGroupName "myresourcegroup" -Name "myiothub" -EventHubConsumerGroupName "myconsumergroup"

Get-AzIotHubEventHubConsumerGroup

El parámetro EventHubEndPointName está obsoleto sin haber sido reemplazado, ya que IotHub incluye solo un punto de conexión integrado ("eventos") que puede manejar los mensajes del sistema y del dispositivo.

Antes

Get-AzIotHubEventHubConsumerGroup -ResourceGroupName "myresourcegroup" -Name "myiothub" -EventHubEndpointName "/EventHubEndpointName"

Después

Get-AzIotHubEventHubConsumerGroup -ResourceGroupName "myresourcegroup" -Name "myiothub"

Remove-AzIotHubEventHubConsumerGroup

El parámetro EventHubEndPointName está obsoleto sin ser reemplazado ya que IoT Hub incluye solo un punto de conexión integrado ("events") que puede manejar los mensajes del sistema y del dispositivo.

Antes

Remove-AzIotHubEventHubConsumerGroup -ResourceGroupName "myresourcegroup" -Name "myiothub" -EventHubConsumerGroupName myconsumergroup -EventHubEndpointName "/EventHubEndpointName"

Después

Remove-AzIotHubEventHubConsumerGroup -ResourceGroupName "myresourcegroup" -Name "myiothub" -EventHubConsumerGroupName myconsumergroup

Set-AzIotHub

El parámetro OperationsMonitoringProperties está en desuso sin reemplazarse porque IotHub ya no usa puntos de conexión predefinidos (“operationsMonitoringEvents”).

RecoveryServices

Edit-AzRecoveryServicesAsrRecoveryPlan

ASRRecoveryPlanGroup.ReplicationProtectedItems, ASRRecoveryPlanGroup.StartGroupActions y ASRRecoveryPlanGroup.EndGroupActions se eliminan de la salida.

Get-AzRecoveryServicesAsrRecoveryPlan

ASRRecoveryPlanGroup.ReplicationProtectedItems, ASRRecoveryPlanGroup.StartGroupActions y ASRRecoveryPlanGroup.EndGroupActions se eliminan de la salida.

New-AzRecoveryServicesAsrReplicationProtectedItem

El parámetro IncludeDiskId se cambia para admitir la escritura directa en un disco administrado en Azure Site Recovery.

Antes

$job = New-AzRecoveryServicesAsrReplicationProtectedItem -RecoveryAzureStorageAccountId $recoveryAzureStorageAccountId -IncludeDiskId $includeDiskId -VMwareToAzure -Account $fabric.FabricSpecificDetails.RunAsAccounts[0] -RecoveryResourceGroupId $RecoveryResourceGroupId -RecoveryAzureNetworkId $RecoveryAzureNetworkId -name $name -ProcessServer $fabric.FabricSpecificDetails.ProcessServers[0] -ProtectableItem $protectableItem -ProtectionContainerMapping $pcm -RecoveryAzureSubnetName $RecoveryAzureSubnetName -RecoveryVmName $RecoveryVmName -LogStorageAccountId $LogStorageAccountId

Después

$disk1 = New-AzRecoveryServicesAsrInMageAzureV2DiskInput -DiskId $diskId -LogStorageAccountId $logStorageAccountId -DiskType $diskType
$disk2 = New-AzRecoveryServicesAsrInMageAzureV2DiskInput -DiskId $diskId2 -LogStorageAccountId $logStorageAccountId -DiskType $diskType2
$job = New-AzRecoveryServicesAsrReplicationProtectedItem -VMwareToAzure -Account $fabric.FabricSpecificDetails.RunAsAccounts[0] -RecoveryResourceGroupId $RecoveryResourceGroupId -RecoveryAzureNetworkId $RecoveryAzureNetworkId -name $name -ProcessServer $fabric.FabricSpecificDetails.ProcessServers[0] -ProtectableItem $protectableItem -ProtectionContainerMapping $pcm -RecoveryAzureSubnetName $RecoveryAzureSubnetName -RecoveryVmName $RecoveryVmName -LogStorageAccountId $LogStorageAccountId -InMageAzureV2DiskInput $disk1,$disk2

Recursos

Incompatibilidad de versión anterior con el módulo Az.Batch

La versión 1.7.1 del módulo "Az.Resources" no es compatible con versiones anteriores (versión 1.1.2 o anterior) del módulo "Az.Batch". Esto provocará que no se pueda importar la versión 1.1.2 del módulo "Az.Batch" cuando se importe la versión 1.7.1 del módulo "Az.Resources". Para corregir este problema, actualice el módulo "Az.Batch" a la versión 2.0.1 o posterior, o simplemente instale la versión más reciente del módulo "Az".

ServiceFabric

Add-ServiceFabricApplicationCertificate

Se ha eliminado Add-ServiceFabricApplicationCertificate, ya que este escenario está cubierto por Add-AzVmssSecret.

Antes

Add-AzServiceFabricApplicationCertificate -ResourceGroupName "Group1" -Name "Contoso01SFCluster" -SecretIdentifier "http://keyVaultName.vault.contoso.net/secrets/secretName/secretVersion"

Después

$Vault = Get-AzKeyVault -VaultName "ContosoVault"
$CertConfig = New-AzVmssVaultCertificateConfig -CertificateUrl "http://keyVaultName.vault.contoso.net/secrets/secretName/secretVersion" -CertificateStore "Certificates"
$VMSS = New-AzVmssConfig
Add-AzVmssSecret -VirtualMachineScaleSet $VMSS -SourceVaultId $Vault.ResourceId -VaultCertificate $CertConfig

SQL

Get-AzSqlDatabaseSecureConnectionPolicy

Tenga en cuenta que la característica de conexión segura está en desuso y, por tanto, el comando ha sido eliminado. Use la hoja base de datos SQL de Azure Portal para ver las cadenas de conexión.

Get-AzSqlDatabaseIndexRecommendations

El alias Get-AzSqlDatabaseIndexRecommendations se ha quitado. Use Get-AzSqlDatabaseIndexRecommendation en su lugar.

Get-AzSqlDatabaseRestorePoints

El alias Get-AzSqlDatabaseRestorePoints se ha quitado. Use Get-AzSqlDatabaseRestorePoint en su lugar.

Get-AzSqlDatabaseAuditing

  • El cmdlet Get-AzSqlDatabaseAudit reemplaza este cmdlet.
  • El tipo de salida cambia del tipo existente :'Microsoft.Azure.Commands.Sql.Auditing.Model.DatabaseBlobAuditingSettingsModel' al nuevo tipo :'Microsoft.Azure.Commands.Sql.Auditing.Model.DatabaseAuditingSettingsModel', quitando las propiedades AuditState y StorageAccountName. y StorageAccountSubscriptionId. Los scripts pueden recuperar la información de la cuenta de almacenamiento de la nueva propiedad StorageAccountResourceId.

Antes

PS C:\> Get-AzSqlDatabaseAuditing -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01"
DatabaseName                 : database01
AuditAction                  : {}
AuditActionGroup             : {SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP,
                                BATCH_COMPLETED_GROUP, ...}
ResourceGroupName            : resourcegroup01
ServerName                   : server01
AuditState                   : Enabled
StorageAccountName           : mystorage
StorageKeyType               : Primary
RetentionInDays              : 0
StorageAccountSubscriptionId : 7fe3301d-31d3-4668-af5e-211a890ba6e3
PredicateExpression          : statement <> 'select 1'

Después

PS C:\> Get-AzSqlDatabaseAudit -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01"
ServerName                          : server01
DatabaseName                        : database01
AuditAction                         : {}
ResourceGroupName                   : resourcegroup01
AuditActionGroup                    : {SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP,
                                       BATCH_COMPLETED_GROUP, ...}
PredicateExpression                 : statement <> 'select 1'
BlobStorageTargetState              : Enabled
StorageAccountResourceId            : /subscriptions/7fe3301d-31d3-4668-af5e-211a890ba6e3/resourceGroups/resourcegroup01/providers/Microsoft.Storage/storageAccounts/mystorage
StorageKeyType                      : Primary
RetentionInDays                     : 0
EventHubTargetState                 : Enabled
EventHubName                        : eventHubName
EventHubAuthorizationRuleResourceId : EventHubAuthorizationRuleResourceId
LogAnalyticsTargetState             : Enabled
WorkspaceResourceId                 : "/subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2"

Set-AzSqlDatabaseAuditing

  • El cmdlet Set-AzSqlDatabaseAudit reemplaza este cmdlet.
  • El tipo de salida cambia del tipo existente :'Microsoft.Azure.Commands.Sql.Auditing.Model.DatabaseBlobAuditingSettingsModel' al nuevo tipo :'bool'

Antes

Set-AzSqlDatabaseAuditing -State Enabled -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -StorageAccountName "Storage22" -DatabaseName "Database01"

Después

Set-AzSqlDatabaseAudit -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01" -BlobStorageTargetState Enabled -StorageAccountResourceId "/subscriptions/7fe3301d-31d3-4668-af5e-211a890ba6e3/resourceGroups/resourcegroup01/providers/Microsoft.Storage/storageAccounts/mystorage"

Get-AzSqlServerAuditing

  • El cmdlet Get-AzSqlServerAudit reemplaza este cmdlet.
  • El tipo de salida cambia del tipo existente :'Microsoft.Azure.Commands.Sql.Auditing.Model.DatabaseBlobAuditingSettingsModel' al nuevo tipo :'Microsoft.Azure.Commands.Sql.Auditing.Model.ServerAuditingSettingsModel'. Se quitan las propiedades AuditState, StorageAccountNamey StorageAccountSubscriptionId. Los scripts que usan StorageAccountName y StorageAccountSubscriptionId proeprties pueden recuperar esta información de la nueva propiedad StorageAccountResourceId.

Antes

PS C:\> Get-AzSqlServerAuditing -ResourceGroupName "resourcegroup01" -ServerName "server01"
AuditActionGroup             : {SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP, BATCH_COMPLETED_GROUP, ...}
ResourceGroupName            : resourcegroup01
ServerName                   : server01
AuditState                   : Enabled
StorageAccountName           : mystorage
StorageKeyType               : Primary
RetentionInDays              : 0
StorageAccountSubscriptionId : 7fe3301d-31d3-4668-af5e-211a890ba6e3
PredicateExpression          : statement <> 'select 1'

Después

PS C:\> Get-AzSqlServerAudit -ResourceGroupName "resourcegroup01" -ServerName "server01"
ServerName                          : server01
ResourceGroupName                   : resourcegroup01
AuditActionGroup                    : {SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP, BATCH_COMPLETED_GROUP, ...}
PredicateExpression                 : statement <> 'select 1'
BlobStorageTargetState              : Enabled
StorageAccountResourceId            : /subscriptions/7fe3301d-31d3-4668-af5e-211a890ba6e3/resourceGroups/resourcegroup01/providers/Microsoft.Storage/storageAccounts/mystorage
StorageKeyType                      : Primary
RetentionInDays                     : 0
EventHubTargetState                 : Enabled
EventHubName                        : eventHubName
EventHubAuthorizationRuleResourceId : EventHubAuthorizationRuleResourceId
LogAnalyticsTargetState             : Enabled
WorkspaceResourceId                 : "/subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2"

Set-AzSqlServerAuditing

  • El cmdlet Set-AzSqlServerAudit reemplaza este cmdlet.
  • El tipo de salida cambia del tipo existente :'Microsoft.Azure.Commands.Sql.Auditing.Model.DatabaseBlobAuditingSettingsModel' al nuevo tipo :'bool'

Antes

Set-AzSqlServerAuditing -State Enabled -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -StorageAccountName "Storage22"

Después

PS C:\> Set-AzSqlServerAudit -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -BlobStorageTargetState Enabled -StorageAccountResourceId "/subscriptions/7fe3301d-31d3-4668-af5e-211a890ba6e3/resourceGroups/resourcegroup01/providers/Microsoft.Storage/storageAccounts/mystorage"

Get-AzSqlServerAdvancedThreatProtectionSettings

El Get-AzSqlServerAdvancedThreatProtectionSettings de cmdlet se reemplaza por Get-AzSqlServerAdvancedThreatProtectionSetting

Antes

Get-AzSqlServerAdvancedThreatProtectionSettings -ResourceGroupName "ResourceGroup11" -ServerName "Server01"

Después

Get-AzSqlServerAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName "Server01"

Clear-AzSqlServerAdvancedThreatProtectionSettings

El Clear-AzSqlServerAdvancedThreatProtectionSettings de cmdlet se reemplaza por Clear-AzSqlServerAdvancedThreatProtectionSetting

Antes

Clear-AzSqlServerAdvancedThreatProtectionSettings -ResourceGroupName "ResourceGroup11" -ServerName "Server01"

Después

Clear-AzSqlServerAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName "Server01"

Update-AzSqlServerAdvancedThreatProtectionSettings

El Update-AzSqlServerAdvancedThreatProtectionSettings de cmdlet se reemplaza por Update-AzSqlServerAdvancedThreatProtectionSetting

Antes

Update-AzSqlServerAdvancedThreatProtectionSettings -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -NotificationRecipientsEmails "admin01@contoso.com;secadmin@contoso.com" -EmailAdmins $False -ExcludedDetectionType "Sql_Injection_Vulnerability","SQL_Injection" -StorageAccountName "mystorageAccount"

Después

Update-AzSqlServerAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -NotificationRecipientsEmails "admin01@contoso.com;secadmin@contoso.com" -EmailAdmins $False -ExcludedDetectionType "Sql_Injection_Vulnerability","SQL_Injection" -StorageAccountName "mystorageAccount"

Get-AzSqlDatabaseAdvancedThreatProtectionSettings

El Get-AzSqlDatabaseAdvancedThreatProtectionSettings de cmdlet se reemplaza por Get-AzSqlDatabaseAdvancedThreatProtectionSetting

Antes

Get-AzSqlDatabaseAdvancedThreatProtectionSettings -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -DatabaseName "Database01"

Después

Get-AzSqlDatabaseAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -DatabaseName "Database01"

Update-AzSqlDatabaseAdvancedThreatProtectionSettings

La cmdlet Update-AzSqlDatabaseAdvancedThreatProtectionSettings es reemplazada por Update-AzSqlDatabaseAdvancedThreatProtectionSetting

Antes

Update-AzSqlDatabaseAdvancedThreatProtectionSettings -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -DatabaseName "Database01" -NotificationRecipientsEmails "admin01@contoso.com;secadmin@contoso.com" -EmailAdmins $False -ExcludedDetectionType "Sql_Injection_Vulnerability", "SQL_Injection" -StorageAccountName "mystorageAccount"

Después

Update-AzSqlDatabaseAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -DatabaseName "Database01" -NotificationRecipientsEmails "admin01@contoso.com;secadmin@contoso.com" -EmailAdmins $False -ExcludedDetectionType "Sql_Injection_Vulnerability", "SQL_Injection" -StorageAccountName "mystorageAccount"

Clear-AzSqlDatabaseAdvancedThreatProtectionSettings

El cmdlet Clear-AzSqlDatabaseAdvancedThreatProtectionSettings es reemplazado por Clear-AzSqlDatabaseAdvancedThreatProtectionSetting.

Antes

Clear-AzSqlDatabaseAdvancedThreatProtectionSettings -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -DatabaseName "Database01"

Después

Clear-AzSqlDatabaseAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -DatabaseName "Database01"

Update-AzSqlDatabaseVulnerabilityAssessmentSettings

El cmdlet Update-AzSqlDatabaseVulnerabilityAssessmentSettings es reemplazado por Update-AzSqlDatabaseVulnerabilityAssessmentSetting

Antes

Update-AzSqlDatabaseVulnerabilityAssessmentSettings `
    -ResourceGroupName "ResourceGroup01"`
    -ServerName "Server01"`
    -DatabaseName "Database01" `
    -StorageAccountName "mystorage" `
    -ScanResultsContainerName "vulnerability-assessment" `
    -RecurringScansInterval Weekly `
    -EmailSubscriptionAdmins $true `
    -NotificationEmail @("mail1@mail.com" , "mail2@mail.com")

Después

Update-AzSqlDatabaseVulnerabilityAssessmentSetting `
    -ResourceGroupName "ResourceGroup01"`
    -ServerName "Server01"`
    -DatabaseName "Database01" `
    -StorageAccountName "mystorage" `
    -ScanResultsContainerName "vulnerability-assessment" `
    -RecurringScansInterval Weekly `
    -EmailSubscriptionAdmins $true `
    -NotificationEmail @("mail1@mail.com" , "mail2@mail.com")

Get-AzSqlDatabaseVulnerabilityAssessmentSettings

El cmdlet Get-AzSqlDatabaseVulnerabilityAssessmentSettings es reemplazado por Get-AzSqlDatabaseVulnerabilityAssessmentSetting

Antes

Get-AzSqlDatabaseVulnerabilityAssessmentSettings `
    -ResourceGroupName "ResourceGroup01" `
    -ServerName "Server01" `
    -DatabaseName "Database01"

Después

Get-AzSqlDatabaseVulnerabilityAssessmentSetting `
    -ResourceGroupName "ResourceGroup01" `
    -ServerName "Server01" `
    -DatabaseName "Database01"

Clear-AzSqlDatabaseVulnerabilityAssessmentSettings

La cmdlet Clear-AzSqlDatabaseVulnerabilityAssessmentSettings se reemplaza por Clear-AzSqlDatabaseVulnerabilityAssessmentSetting

Antes

Clear-AzSqlDatabaseVulnerabilityAssessmentSettings `
    -ResourceGroupName "ResourceGroup01" `
    -ServerName "Server01" `
    -DatabaseName "Database01"

Después

Clear-AzSqlDatabaseVulnerabilityAssessmentSetting `
    -ResourceGroupName "ResourceGroup01" `
    -ServerName "Server01" `
    -DatabaseName "Database01"

Update-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings

El cmdlet Update-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings es reemplazado por Update-AzSqlInstanceDatabaseVulnerabilityAssessmentSetting

Antes

Update-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings `
    -ResourceGroupName "ResourceGroup01" `
    -InstanceName "ManagedInstance01" `
    -DatabaseName "Database01" `
    -StorageAccountName "mystorage" `
    -ScanResultsContainerName "vulnerability-assessment" `
    -RecurringScansInterval Weekly `
    -EmailSubscriptionAdmins $true `
    -NotificationEmail @("mail1@mail.com" , "mail2@mail.com")

Después

Update-AzSqlInstanceDatabaseVulnerabilityAssessmentSetting `
    -ResourceGroupName "ResourceGroup01" `
    -InstanceName "ManagedInstance01" `
    -DatabaseName "Database01" `
    -StorageAccountName "mystorage" `
    -ScanResultsContainerName "vulnerability-assessment" `
    -RecurringScansInterval Weekly `
    -EmailSubscriptionAdmins $true `
    -NotificationEmail @("mail1@mail.com" , "mail2@mail.com")

Get-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings

El cmdlet Get-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings es reemplazado por Get-AzSqlInstanceDatabaseVulnerabilityAssessmentSetting

Antes

Get-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings `
    -ResourceGroupName "ResourceGroup01" `
    -ServerName "Server01" `
    -DatabaseName "Database01"

Después

Get-AzSqlInstanceDatabaseVulnerabilityAssessmentSetting `
    -ResourceGroupName "ResourceGroup01" `
    -ServerName "Server01" `
    -DatabaseName "Database01"

Clear-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings

Cmdlet Clear-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings se reemplaza por Clear-AzSqlInstanceDatabaseVulnerabilityAssessmentSetting

Antes

Clear-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings `
    -ResourceGroupName "ResourceGroup01" `
    -ServerName "Server01" `
    -DatabaseName "Database01"

Después

Clear-AzSqlInstanceDatabaseVulnerabilityAssessmentSetting `
    -ResourceGroupName "ResourceGroup01" `
    -ServerName "Server01" `
    -DatabaseName "Database01"

Update-AzSqlInstanceVulnerabilityAssessmentSettings

La cmdlet Update-AzSqlInstanceVulnerabilityAssessmentSettings es reemplazada por Update-AzSqlInstanceVulnerabilityAssessmentSetting

Antes

Update-AzSqlInstanceVulnerabilityAssessmentSettings `
    -ResourceGroupName "ResourceGroup01" `
    -InstanceName "ManagedInstance01" `
    -StorageAccountName "mystorage" `
    -ScanResultsContainerName "vulnerability-assessment" `
    -RecurringScansInterval Weekly `
    -EmailSubscriptionAdmins $true `
    -NotificationEmail @("mail1@mail.com" , "mail2@mail.com")

Después

Update-AzSqlInstanceVulnerabilityAssessmentSetting `
    -ResourceGroupName "ResourceGroup01" `
    -InstanceName "ManagedInstance01" `
    -StorageAccountName "mystorage" `
    -ScanResultsContainerName "vulnerability-assessment" `
    -RecurringScansInterval Weekly `
    -EmailSubscriptionAdmins $true `
    -NotificationEmail @("mail1@mail.com" , "mail2@mail.com")

Get-AzSqlInstanceVulnerabilityAssessmentSettings

Cmdlet Get-AzSqlInstanceVulnerabilityAssessmentSettings se reemplaza por Get-AzSqlInstanceVulnerabilityAssessmentSetting

Antes

Get-AzSqlInstanceVulnerabilityAssessmentSettings `
    -ResourceGroupName "ResourceGroup01" `
    -ServerName "Server01" `
    -DatabaseName "Database01"

Después

Get-AzSqlInstanceVulnerabilityAssessmentSetting `
    -ResourceGroupName "ResourceGroup01" `
    -ServerName "Server01" `
    -DatabaseName "Database01"

Clear-AzSqlInstanceVulnerabilityAssessmentSettings

El cmdlet Clear-AzSqlInstanceVulnerabilityAssessmentSettings es reemplazado por Clear-AzSqlInstanceVulnerabilityAssessmentSetting

Antes

Clear-AzSqlInstanceVulnerabilityAssessmentSettings `
    -ResourceGroupName "ResourceGroup01" `
    -ServerName "Server01" `
    -DatabaseName "Database01"

Después

Clear-AzSqlInstanceVulnerabilityAssessmentSetting `
    -ResourceGroupName "ResourceGroup01" `
    -ServerName "Server01" `
    -DatabaseName "Database01"

Update-AzSqlServerVulnerabilityAssessmentSettings

El cmdlet Update-AzSqlServerVulnerabilityAssessmentSettings se reemplaza por Update-AzSqlServerVulnerabilityAssessmentSetting.

Antes

Update-AzSqlServerVulnerabilityAssessmentSettings `
    -ResourceGroupName "ResourceGroup01"`
    -ServerName "Server01"`
    -StorageAccountName "mystorage" `
    -ScanResultsContainerName "vulnerability-assessment" `
    -RecurringScansInterval Weekly `
    -EmailSubscriptionAdmins $true `
    -NotificationEmail @("mail1@mail.com" , "mail2@mail.com")

Después

Update-AzSqlServerVulnerabilityAssessmentSetting `
    -ResourceGroupName "ResourceGroup01"`
    -ServerName "Server01"`
    -StorageAccountName "mystorage" `
    -ScanResultsContainerName "vulnerability-assessment" `
    -RecurringScansInterval Weekly `
    -EmailSubscriptionAdmins $true `
    -NotificationEmail @("mail1@mail.com" , "mail2@mail.com")

Get-AzSqlServerVulnerabilityAssessmentSettings

El cmdlet Get-AzSqlServerVulnerabilityAssessmentSettings es reemplazado por Get-AzSqlServerVulnerabilityAssessmentSetting

Antes

Get-AzSqlServerVulnerabilityAssessmentSettings `
    -ResourceGroupName "ResourceGroup01" `
    -ServerName "Server01" `
    -DatabaseName "Database01"

Después

Get-AzSqlServerVulnerabilityAssessmentSetting `
    -ResourceGroupName "ResourceGroup01" `
    -ServerName "Server01" `
    -DatabaseName "Database01"

Clear-AzSqlServerVulnerabilityAssessmentSettings

Cmdlet Clear-AzSqlServerVulnerabilityAssessmentSettings se reemplaza por Clear-AzSqlServerVulnerabilityAssessmentSetting

Antes

Clear-AzSqlServerVulnerabilityAssessmentSettings `
    -ResourceGroupName "ResourceGroup01" `
    -ServerName "Server01" `
    -DatabaseName "Database01"

Después

Clear-AzSqlDatabaseVulnerabilityAssessmentSetting `
    -ResourceGroupName "ResourceGroup01" `
    -ServerName "Server01" `
    -DatabaseName "Database01"

Get-AzSqlServerAdvancedThreatProtectionPolicy

Se ha eliminado el cmdlet Get-AzSqlServerAdvancedThreatProtectionPolicy y no se va a reemplazar por otro cmdlet.

Get-AzSqlServerThreatDetectionPolicy

La cmdlet Get-AzSqlServerThreatDetectionPolicy se reemplaza por Get-AzSqlServerThreatDetectionSetting.

Antes

PS C:\> Get-AzSqlServerThreatDetectionPolicy -ResourceGroupName "ResourceGroup11" -ServerName "Server01"
ResourceGroupName            : ResourceGroup11
ServerName                   : Server01
ThreatDetectionState         : Enabled
NotificationRecipientsEmails : admin@myCompany.com
StorageAccountName           : mystorage
EmailAdmins                  : True
ExcludedDetectionTypes       : {}
RetentionInDays              : 0

Después

PS C:\> Get-AzSqlServerAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName "Server01"
ResourceGroupName            : ResourceGroup11
ServerName                   : Server01
ThreatDetectionState         : Enabled
NotificationRecipientsEmails : admin@myCompany.com
StorageAccountName           : mystorage
EmailAdmins                  : True
ExcludedDetectionTypes       : {}
RetentionInDays              : 0

Remove-AzSqlServerThreatDetectionPolicy

El cmdlet Remove-AzSqlServerThreatDetectionPolicy es reemplazado por Clear-AzSqlServerAdvancedThreatProtectionSetting

Antes

Remove-AzSqlServerThreatDetectionPolicy -ResourceGroupName "ResourceGroup11" -ServerName "Server01"

Después

Clear-AzSqlServerAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName "Server01"

Set-AzSqlServerThreatDetectionPolicy

El cmdlet Set-AzSqlServerThreatDetectionPolicy se reemplaza por Update-AzSqlServerAdvancedThreatProtectionSetting

Antes

Set-AzSqlServerThreatDetectionPolicy -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -NotificationRecipientsEmails "admin01@contoso.com;secadmin@contoso.com" -EmailAdmins $False -ExcludedDetectionType "Sql_Injection_Vulnerability","SQL_Injection" -StorageAccountName "mystorageAccount"

Después

Update-AzSqlServerAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -NotificationRecipientsEmails "admin01@contoso.com;secadmin@contoso.com" -EmailAdmins $False -ExcludedDetectionType "Sql_Injection_Vulnerability","SQL_Injection" -StorageAccountName "mystorageAccount"

Get-AzSqlDatabaseThreatDetectionPolicy

El cmdlet Get-AzSqlDatabaseThreatDetectionPolicy se reemplaza por Get-AzSqlDatabaseThreatDetectionSetting

Antes

PS C:\> Get-AzSqlDatabaseThreatDetectionPolicy -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -DatabaseName   "Database01"
DatabaseName                 : Database01
ResourceGroupName            : ResourceGroup11
ServerName                   : Server01
ThreatDetectionState         : Enabled
NotificationRecipientsEmails : admin@myCompany.com
StorageAccountName           : mystorage
EmailAdmins                  : True
ExcludedDetectionTypes       : {}
RetentionInDays              : 0

Después

PS C:\> Get-AzSqlDatabaseAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName "Server01"   -DatabaseName "Database01"
DatabaseName                 : Database01
ResourceGroupName            : ResourceGroup11
ServerName                   : Server01
ThreatDetectionState         : Enabled
NotificationRecipientsEmails : admin@myCompany.com
StorageAccountName           : mystorage
EmailAdmins                  : True
ExcludedDetectionTypes       : {}
RetentionInDays              : 0

Set-AzSqlDatabaseThreatDetectionPolicy

El cmdlet Set-AzSqlDatabaseThreatDetectionPolicy es reemplazado por Update-AzSqlDatabaseAdvancedThreatProtectionSetting

Antes

Set-AzSqlDatabaseThreatDetectionPolicy -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -DatabaseName "Database01" -NotificationRecipientsEmails "admin01@contoso.com;secadmin@contoso.com" -EmailAdmins $False -ExcludedDetectionType "Sql_Injection_Vulnerability", "SQL_Injection" -StorageAccountName "mystorageAccount"

Después

Update-AzSqlDatabaseAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -DatabaseName "Database01" -NotificationRecipientsEmails "admin01@contoso.com;secadmin@contoso.com" -EmailAdmins $False -ExcludedDetectionType "Sql_Injection_Vulnerability", "SQL_Injection" -StorageAccountName "mystorageAccount"

Remove-AzSqlDatabaseThreatDetectionPolicy

El cmdlet Remove-AzSqlDatabaseThreatDetectionPolicy es reemplazado por Clear-AzSqlDatabaseAdvancedThreatProtectionSetting

Antes

Remove-AzSqlDatabaseThreatDetectionPolicy -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -DatabaseName "Database01"

Después

Clear-AzSqlDatabaseAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -DatabaseName "Database01"