共用方式為


Az 3.0.0 的移轉指南

本文件說明 Az 2.0.0 與 3.0.0 版之間的變更

Batch

Get-AzBatchNodeAgentSku

  • 移除 Get-AzBatchNodeAgentSku,並以 Get-AzBatchSupportedImage 加以取代。
  • Get-AzBatchSupportedImage 會傳回與 Get-AzBatchNodeAgentSku 相同的資料,但格式較易懂。
  • 現在也會傳回新的未驗證映射。 也會包含每個映射和 BatchSupportEndOfLife 的其他資訊 Capabilities

之前

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

之後

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

與 Az. Resources 模組的舊版不相容

‘Az.Batch’ 模組的 2.0.1 版本與 ‘Az.Resources’ 模組的舊版 (1.7.0 或更早版本) 不相容。 這會導致在匯入 ‘Az.Batch’ 模組的 2.0.1 版時,無法匯入 ‘Az.Resources’ 模組的 1.7.0 版。 要修正此問題,只要將 ‘Az.Resources’ 模組更新為 1.7.1 或更高版本,或只安裝最新版的 ‘Az’ 模組即可。

計算

New-AzDiskConfig

上傳 CreateOption 時,已使用 UploadSizeInBytes 參數而非 New-AzDiskConfigDiskSizeGB

之前

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

之後

$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

  • 已更新 Get-AzHDInsightJobOutput Cmdlet 以支援對儲存體金鑰的細微角色型存取。
  • 具有 HDInsight 叢集操作員、參與者或擁有者角色的使用者將不受影響。
  • 具有讀者角色的使用者將必須明確指定 DefaultStorageAccountKey 參數。

之前

Get-AzHDInsightJobOutput  -ClusterName $clusterName -JobId $jobId

之後

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

Add-AzHDInsightConfigValues

Cmdlet Add-AzHDInsightConfigValue 已移除 Add-AzHDInsightConfigValues 的別名。

之前

使用已淘汰的別名

Add-AzHDInsightConfigValues

之後

Add-AzHDInsightConfigValue

Disable-AzHDInsightMonitoring

已新增新的 Disable-AzHDInsightMonitoring Cmdlet。 使用此 Cmdlet 來停用 HDInsight 叢集中的監視 (取代 Disable-AzHDInsightOperationsManagementSuiteDisable-AzHDInsightOMS)。

之前

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

之後

Disable-AzHDInsightMonitoring -Name testcluster

Enable-AzHDInsightMonitoring

已新增新的 Enable-AzHDInsightMonitoring Cmdlet。 使用此 Cmdlet 來啟用 HDInsight 叢集中的監視 (取代 Enable-AzHDInsightOperationsManagementSuiteEnable-AzHDInsightOMS)。

之前

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>

之後

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

Get-AzHDInsightMonitoring

已新增新的 Get-AzHDInsightMonitoring Cmdlet。 使用此 Cmdlet 取得Azure HDInsight 叢集中的安裝監視狀態 (取代 Get-AzHDInsightOperationsManagementSuiteGet-AzHDInsightOMS)。

之前

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

之後

Get-AzHDInsightMonitoring -Name testcluster

Get-AzHDInsightProperty

Cmdlet Get-HDInsightProperty 已移除 Get-AzHDInsightProperties 的別名。

之前

使用已淘汰的別名

Get-AzHDInsightProperties -Location "East US 2"

之後

Get-AzHDInsightProperty -Location "East US 2"

Grant-AzHDInsightRdpServicesAccess

已移除 Grant-AzHDInsightRdpServicesAccessRevoke-AzHDInsightRdpServicesAccess Cmdlet。 因為不支援使用 Windows OS 類型的叢集,所以不再需要這些項目。 請改為使用 Linux OS 類型來建立叢集。

Remove-AzHDInsightCluster

Remove-AzHDInsightCluster 的輸出類型從 Microsoft.Azure.Management.HDInsight.Models.ClusterGetResponse 變更為 bool

之前

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

之後

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

Revoke-AzHDInsightRdpServicesAccess

Cmdlet 已淘汰。 且沒有取代項目。

Set-AzHDInsightGatewayCredential

Set-AzHDInsightGatewayCredential 的輸出類型從 HttpConnectivitySettings 變更為 AzureHDInsightGatewaySettings

IotHub

New-AzIotHubImportDevices

已移除別名;請改用 New-AzIotHubImportDevice

之前

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"

之後

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

已移除別名;請改用 New-AzIotHubExportDevice

之前

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

之後

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

參數 EventHubEndPointName 已淘汏且沒有取代項目。因為 IotHub 只有一個內建 endpoint("events"),無法處理系統和裝置訊息。

之前

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

之後

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

Get-AzIotHubEventHubConsumerGroup

參數 EventHubEndPointName 已淘汏且沒有取代項目。因為 IotHub 只有一個內建 endpoint("events"),無法處理系統和裝置訊息。

之前

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

之後

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

Remove-AzIotHubEventHubConsumerGroup

參數 EventHubEndPointName 已淘汏且沒有取代項目。因為 IotHub 只有一個內建 endpoint("events"),無法處理系統和裝置訊息。

之前

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

之後

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

Set-AzIotHub

參數 OperationsMonitoringProperties 已淘汏且沒有取代項目。因為 IotHub 不再使用內建 endpoint("operationsMonitoringEvents")。

RecoveryServices

Edit-AzRecoveryServicesAsrRecoveryPlan

ASRRecoveryPlanGroup.ReplicationProtectedItemsASRRecoveryPlanGroup.StartGroupActionsASRRecoveryPlanGroup.EndGroupActions 已從輸出中移除。

Get-AzRecoveryServicesAsrRecoveryPlan

ASRRecoveryPlanGroup.ReplicationProtectedItemsASRRecoveryPlanGroup.StartGroupActionsASRRecoveryPlanGroup.EndGroupActions 已從輸出中移除。

New-AzRecoveryServicesAsrReplicationProtectedItem

參數 IncludeDiskId已變更為直接支援寫入 Azure Site Recovery 中的受控磁碟。

之前

$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

之後

$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

資源

與 Az.Batch 模組的舊版不相容

‘Az.Resources’ 模組的1.7.1 版本與 ‘Az.Batch’ 模組的舊版 (1.1.2 或更早版本) 不相容。 這會導致在匯入 ‘Az.Resources’ 模組的 1.7.1 版時,無法匯入 ‘Az.Batch’ 模組的 1.1.2 版。 要修正此問題,請將 ‘Az.Batch’ 模組更新為 2.0.1 或更高版本,或只安裝最新版的 ‘Az’ 模組即可。

ServiceFabric

Add-ServiceFabricApplicationCertificate

已移除 Add-ServiceFabricApplicationCertificate,因為 Add-AzVmssSecret 涵蓋此案例。

之前

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

之後

$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

請注意,安全連線已被取代,因此會移除命令。 請使用 Azure 入口網站中的 SQL 資料庫刀鋒視窗來檢視連接字串

Get-AzSqlDatabaseIndexRecommendations

已移除 Get-AzSqlDatabaseIndexRecommendations 別名。 請改用 Get-AzSqlDatabaseIndexRecommendation

Get-AzSqlDatabaseRestorePoints

已移除 Get-AzSqlDatabaseRestorePoints 別名。 請改用 Get-AzSqlDatabaseRestorePoint

Get-AzSqlDatabaseAuditing

  • Cmdlet Get-AzSqlDatabaseAudit 已取代此 Cmdlet。
  • 輸出類型正在從現有的類型 :'Microsoft.Azure.Commands.Sql.Auditing.Model.DatabaseBlobAuditingSettingsModel' 變更為新類型:'Microsoft.Azure.Commands.Sql.Auditing.Model.DatabaseAuditingSettingsModel',並移除了屬性 AuditStateStorageAccountName。 和 StorageAccountSubscriptionId。 指令碼可以從新的 StorageAccountResourceId 屬性取得儲存體帳戶資訊。

之前

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'

之後

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

  • Cmdlet Set-AzSqlDatabaseAudit 已取代此 Cmdlet。
  • 輸出類型正在從現有的類型 :'Microsoft.Azure.Commands.Sql.Auditing.Model.DatabaseBlobAuditingSettingsModel' 變更為新類型:'bool'

之前

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

之後

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

  • Cmdlet Get-AzSqlServerAudit 已取代此 Cmdlet。
  • 輸出類型正在從現有的類型 :'Microsoft.Azure.Commands.Sql.Auditing.Model.DatabaseBlobAuditingSettingsModel' 變更為新類型:'Microsoft.Azure.Commands.Sql.Auditing.Model.ServerAuditingSettingsModel', 並移除了屬性 AuditStateStorageAccountNameStorageAccountSubscriptionId。 使用 StorageAccountNameStorageAccountSubscriptionId 屬性的指令碼可從新的 StorageAccountResourceId 屬性取出此資訊。

之前

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'

之後

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

  • Cmdlet Set-AzSqlServerAudit 已取代此 Cmdlet。
  • 輸出類型正在從現有的類型 :'Microsoft.Azure.Commands.Sql.Auditing.Model.DatabaseBlobAuditingSettingsModel' 變更為新類型:'bool'

之前

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

之後

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

Cmdlet Get-AzSqlServerAdvancedThreatProtectionSettings 已由 Get-AzSqlServerAdvancedThreatProtectionSetting 取代

之前

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

之後

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

Clear-AzSqlServerAdvancedThreatProtectionSettings

Cmdlet Clear-AzSqlServerAdvancedThreatProtectionSettings 已由 Clear-AzSqlServerAdvancedThreatProtectionSetting 取代

之前

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

之後

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

Update-AzSqlServerAdvancedThreatProtectionSettings

Cmdlet Update-AzSqlServerAdvancedThreatProtectionSettings 已由 Update-AzSqlServerAdvancedThreatProtectionSetting 取代

之前

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

之後

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

Cmdlet Get-AzSqlDatabaseAdvancedThreatProtectionSettings 已由 Get-AzSqlDatabaseAdvancedThreatProtectionSetting 取代

之前

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

之後

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

Update-AzSqlDatabaseAdvancedThreatProtectionSettings

Cmdlet Update-AzSqlDatabaseAdvancedThreatProtectionSettings 已由 Update-AzSqlDatabaseAdvancedThreatProtectionSetting 取代

之前

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"

之後

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

Cmdlet Clear-AzSqlDatabaseAdvancedThreatProtectionSettings 已由 Clear-AzSqlDatabaseAdvancedThreatProtectionSetting 取代

之前

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

之後

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

Update-AzSqlDatabaseVulnerabilityAssessmentSettings

Cmdlet Update-AzSqlDatabaseVulnerabilityAssessmentSettings 已由 Update-AzSqlDatabaseVulnerabilityAssessmentSetting 取代

之前

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

之後

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

Cmdlet Get-AzSqlDatabaseVulnerabilityAssessmentSettings 已由 Get-AzSqlDatabaseVulnerabilityAssessmentSetting 取代

之前

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

之後

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

Clear-AzSqlDatabaseVulnerabilityAssessmentSettings

Cmdlet Clear-AzSqlDatabaseVulnerabilityAssessmentSettings 已由 Clear-AzSqlDatabaseVulnerabilityAssessmentSetting 取代

之前

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

之後

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

Update-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings

Cmdlet Update-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings 已由 Update-AzSqlInstanceDatabaseVulnerabilityAssessmentSetting 取代

之前

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

之後

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

Cmdlet Get-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings 已由 Get-AzSqlInstanceDatabaseVulnerabilityAssessmentSetting 取代

之前

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

之後

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

Clear-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings

Cmdlet Clear-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings 已由 Clear-AzSqlInstanceDatabaseVulnerabilityAssessmentSetting 取代

之前

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

之後

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

Update-AzSqlInstanceVulnerabilityAssessmentSettings

Cmdlet Update-AzSqlInstanceVulnerabilityAssessmentSettings 已由 Update-AzSqlInstanceVulnerabilityAssessmentSetting 取代

之前

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

之後

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 已由 Get-AzSqlInstanceVulnerabilityAssessmentSetting 取代

之前

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

之後

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

Clear-AzSqlInstanceVulnerabilityAssessmentSettings

Cmdlet Clear-AzSqlInstanceVulnerabilityAssessmentSettings 已由 Clear-AzSqlInstanceVulnerabilityAssessmentSetting 取代

之前

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

之後

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

Update-AzSqlServerVulnerabilityAssessmentSettings

Cmdlet Update-AzSqlServerVulnerabilityAssessmentSettings 已由 Update-AzSqlServerVulnerabilityAssessmentSetting 取代

之前

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

之後

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

Get-AzSqlServerVulnerabilityAssessmentSettings

Cmdlet Get-AzSqlServerVulnerabilityAssessmentSettings 已由 Get-AzSqlServerVulnerabilityAssessmentSetting 取代

之前

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

之後

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

Clear-AzSqlServerVulnerabilityAssessmentSettings

Cmdlet Clear-AzSqlServerVulnerabilityAssessmentSettings 已由 Clear-AzSqlServerVulnerabilityAssessmentSetting 取代

之前

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

之後

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

Get-AzSqlServerAdvancedThreatProtectionPolicy

Cmdlet Get-AzSqlServerAdvancedThreatProtectionPolicy 已刪除,且沒有取代的 Cmdlet

Get-AzSqlServerThreatDetectionPolicy

Cmdlet Get-AzSqlServerThreatDetectionPolicy 已由 Get-AzSqlServerThreatDetectionSetting 取代

之前

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

之後

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

Cmdlet Remove-AzSqlServerThreatDetectionPolicy 已由 Clear-AzSqlServerAdvancedThreatProtectionSetting 取代

之前

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

之後

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

Set-AzSqlServerThreatDetectionPolicy

Cmdlet Set-AzSqlServerThreatDetectionPolicy 已由 Update-AzSqlServerAdvancedThreatProtectionSetting 取代

之前

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

之後

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

Cmdlet Get-AzSqlDatabaseThreatDetectionPolicy 已由 Get-AzSqlDatabaseThreatDetectionSetting 取代

之前

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

之後

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

Cmdlet Set-AzSqlDatabaseThreatDetectionPolicy 已由 Update-AzSqlDatabaseAdvancedThreatProtectionSetting 取代

之前

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"

之後

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

Cmdlet Remove-AzSqlDatabaseThreatDetectionPolicy 已由 Clear-AzSqlDatabaseAdvancedThreatProtectionSetting 取代

之前

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

之後

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