共用方式為


Az 8.0.0 的移轉指南

Az.Aks

Get-AzAks

已移除別名 Get-AzAks。 請改用 Get-AzAksCluster

之前

Get-AzAks -ResourceGroupName $resourceGroupName -Name $name

之後

Get-AzAksCluster -ResourceGroupName $resourceGroupName -Name $name

New-AzAks

已移除別名 New-AzAks。 請改用 New-AzAksCluster

之前

New-AzAks -ResourceGroupName $resourceGroupName -Name $name -Location $location

之後

New-AzAksCluster -ResourceGroupName $resourceGroupName -Name $name -Location $location

Set-AzAks

已移除別名 Set-AzAks。 請改用 Set-AzAksCluster

之前

Set-AzAks -ResourceGroupName $resourceGroupName -Name $name

之後

Set-AzAksCluster -ResourceGroupName $resourceGroupName -Name $name

Remove-AzAks

已移除別名 Remove-AzAks。 請改用 Remove-AzAksCluster

之前

Remove-AzAks -ResourceGroupName $resourceGroupName -Name $name

之後

Remove-AzAksCluster -ResourceGroupName $resourceGroupName -Name $name

Az.Cdn

New-AzCdnProfile

已將參數類型 Sku 變更為 SkuName 已將 ProfileName 參數類型變更為 Name

之前

$profileSku = "Standard_Microsoft";
$cdnProfileName = "profileNameXXXX";
$resourceGroupName = "myresourcegroup"
New-AzCdnProfile -Sku $profileSku -ProfileName $cdnProfileName -ResourceGroupName $resourceGroupName -Location Global

之後

$profileSku = "Standard_Microsoft";
$cdnProfileName = "profileNameXXXX";
$resourceGroupName = "myresourcegroup"
New-AzCdnProfile -SkuName $profileSku -Name $cdnProfileName -ResourceGroupName $resourceGroupName -Location Global

New-AzCdnEndpoint

已將參數 EndpointName 變更為 Name 已將參數 GeoFilters 變更為 GeoFilter 已將參數 DefaultOriginGroup 變更為 DefaultOriginGroupId 將參數 OriginHostNameOriginIdOriginNamePriorityPrivateLinkApprovalMessagePrivateLinkLocationPrivateLinkResourceIdWeightHttpPortHttpsPort 合併為參數 Origin 將參數 OriginGroupNameOriginGroupProbeIntervalInSecondsOriginGroupProbePathOriginGroupProbeProtocolOriginGroupProbeRequestType 合併為參數 OriginGroup 將參數 DeliveryPolicy 分割為參數 DeliveryPolicyDescriptionDeliveryPolicyRule 新增參數 SubscriptionIdUrlSigningKeyWebApplicationFirewallPolicyLinkId 刪除參數 CdnProfile

之前

New-AzCdnEndpoint -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -Location westus -EndpointName myendpoint `
                  -OriginName mystorage -OriginHostName mystorage.blob.core.windows.net `
                  -OriginHostHeader mystorage.blob.core.windows.net -IsHttpAllowed $false

之後

$origin = @{
  Name = "origin1"
  HostName = "host1.hello.com"
};
$location = "westus"

$endpoint = New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin

New-AzCdnDeliveryPolicy

刪除命令 New-AzCdnDeliveryPolicy。 使用 New-AzCdnDeliveryRuleObject 建立規則物件,並直接在 New-AzCdnEndpoint 中使用它

New-AzCdnDeliveryRule

已將命令名稱變更為 New-AzCdnDeliveryRuleObject

之前

New-AzCdnDeliveryRule -Name "rule1" -Order 1 -Condition $cond1 -Action $action1

之後

$cond1 = New-AzCdnDeliveryRuleIsDeviceConditionObject -Name "IsDevice" -ParameterMatchValue "Desktop"
$action1 = New-AzCdnUrlRewriteActionObject -Name "UrlRewrite" -ParameterDestination "/def" -ParameterSourcePattern "/abc" -ParameterPreserveUnmatchedPath $true
$rule1 = New-AzCdnDeliveryRuleObject -Name "Rule1" -Action $action1,$action2 -Condition $cond1 -Order 1

New-AzCdnCustomDomain

已將參數 CustomDomainName 的類型變更為 Name 新增參數 SubscriptionId 刪除參數 CdnEndpoint

之前

New-AzCdnCustomDomain -ResourceGroupName $resourceGroupName -ProfileName $cdnProfileName -EndpointName $endpointName -CustomDomainName $customDomainName -HostName $customDomainHostName

之後

New-AzCdnCustomDomain -ResourceGroupName $resourceGroupName -ProfileName $cdnProfileName -EndpointName $endpointName -Name $customDomainName -HostName $customDomainHostName -SubscriptionId $subId

Set-AzCdnProfile

已由命令 Update-AzCdnProfile 取代

之前

$profileObject = Get-AzCdnProfile -ResourceGroupName myresourcegroup -ProfileName mycdnprofile
$profileObject.Tags = @{"key"="value"}
Set-AzCdnProfile -CdnProfile $profileObject

之後

$profileSku = "Standard_Microsoft";
$cdnProfileName = "profileNameXXXX";
$resourceGroupName = "myresourcegroup"
New-AzCdnProfile -SkuName $profileSku -Name $cdnProfileName -ResourceGroupName $resourceGroupName -Location Global

$tags = @{
  Tag1 = 11
  Tag2  = 22
}
Update-AzCdnProfile -Name $cdnProfileName -ResourceGroupName $resourceGroupName -Tag $tags

Set-AzCdnEndpoint

已由命令 Update-AzCdnEndpoint 取代。當您想要更新 DeliveryPolicyDescriptionDeliveryPolicyRule 其中一個時,應該一起提供它們。

之前

$endpointObject = Get-AzCdnEndpoint -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -EndpointName myendpoint
$endpointObject.IsHttpAllowed = $false
Set-AzCdnEndpoint -CdnEndpoint $endpointObject

之後

$tags = @{
  Tag1 = 11
  Tag2  = 22
}

//Update tags
Update-AzCdnEndpoint -Name $endpointName -ProfileName $cdnProfileName -ResourceGroupName $resourceGroupName -Tag $tags

//Update DeliveryPolicyDescription or DeliveryPolicyRule
Update-AzCdnEndpoint -Name $endpointName -ProfileName $cdnProfileName -ResourceGroupName $resourceGroupName `
   -DeliveryPolicyDescription $descprption -DeliveryPolicyRule $rule

Set-AzCdnOriginGroup

已由命令 Update-AzCdnOriginGroup 取代

之前

Set-AzCdnOriginGroup -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName -OriginGroupName $originGroupName -OriginId $originIds -ProbeIntervalInSeconds $probeInterval

之後

Update-AzCdnOriginGroup -EndpointName $endpointName -Name $originGroup.Name -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName `
                -HealthProbeSetting $healthProbeParametersObject2 -Origin @(@{ Id = $originId })

Set-AzCdnOrigin

已由命令 Update-AzCdnOrigin 取代

之前

Set-AzCdnOrigin -ResourceGroupName $resourceGroupName -ProfileName $cdnProfileName -EndpointName $endpointName `
    -OriginName $originName -HostName "mystorage2.blob.core.windows.net"

之後

Update-AzCdnOrigin -ResourceGroupName $resourceGroupName -ProfileName $cdnProfileName -EndpointName $endpointName `
    -Name $originName  -HostName "mystorage2.blob.core.windows.net" -HttpPort 456 -HttpsPort 789

Unpublish-AzCdnEndpointContent

已由命令 Clear-AzCdnEndpointContent 取代

之前

Unpublish-AzCdnEndpointContent -ResourceGroupName $resourceGroupName -ProfileName $cdnProfileName -EndpointName $endpointName `
   -PurgeContent $PurgeContent   

之後

Clear-AzCdnEndpointContent -ResourceGroupName $resourceGroupName -ProfileName $cdnProfileName -EndpointName $endpointName `
   -ContentPath $PurgeContent   

Publish-AzCdnEndpointContent

已由命令 Import-AzCdnEndpointContent 取代

之前

Publish-AzCdnEndpointContent -ResourceGroupName $resourceGroupName -ProfileName $cdnProfileName -EndpointName $endpointName `
   -LoadContent $LoadContent

之後

Import-AzCdnEndpointContent -ResourceGroupName $resourceGroupName -ProfileName $cdnProfileName -EndpointName $endpointName `
   -ContentPath $LoadContent

Az.EventHub

New-AzEventHubNamespace

已移除參數 Identity

之前

New-AzEventHubNamespace -ResourceGroupName myresourcegroup -Name MyNamespaceName -Location northeurope -SkuName Premium -IdentityType SystemAssigned -Identity

之後

New-AzEventHubNamespace -ResourceGroupName myresourcegroup -Name MyNamespaceName -Location northeurope -SkuName Premium -IdentityType SystemAssigned

Set-AzEventHubNamespace

已移除參數 Identity

之前

Set-AzEventHubNamespace -ResourceGroupName myresourcegroup -Name MyNamespaceName -EncryptionConfig $ec1,$ec2 -Identity

之後

Set-AzEventHubNamespace -ResourceGroupName myresourcegroup -Name MyNamespaceName -EncryptionConfig $ec1,$ec2

Az.HealthcareApis

Set-AzHealthcareApisService

將 New-AzHealthcareApisService and Set-AzHealthcareApisService 合併為 New-AzHealthcareApisService

之前

Set-AzHealthcareApisService -Name MyService -ResourceGroupName MyResourceGroup -CosmosOfferThroughput 500

之後

New-AzHealthcareApisService -Name MyService -ResourceGroupName MyResourceGroup -Location MyLocation -Kind fhir-R4 -CosmosOfferThroughput 500

Get-AzHealthcareApisService

已移除 -ResourceId

之前

Get-AzHealthcareApisService -ResourceId $ResourceId

之後

Get-AzHealthcareApisService -ResourceGroupName $ResourceGroup -Name $Name

Remove-AzHealthcareApisService

已移除 -ResourceId

之前

Remove-AzHealthcareApisService -ResourceId $ResourceId

之後

Remove-AzHealthcareApisService -ResourceGroupName $ResourceGroup -Name $Name

New-AzHealthcareApisService

-ManagedIdentity 已重新命名為 -IdentityType 已移除 -FhirVersion,而且可以使用參數 -Kind 選取所需的內容 -DisableCorsCredential-AllowCorsCredential:現在統一命名為 -AllowCorsCredential,範例:-AllowCorsCredential:$false 或 -AllowCorsCredential:$true -DisableSmartProxy-EnableSmartProxy:現在統一命名為 -EnableSmartProxy,範例:-EnableSmartProxy:$false 或 -EnableSmartProxy:$true

之前

New-AzHealthcareApisService -Name MyService -ResourceGroupName MyResourceGroup -Location MyLocation -FhirVersion fhir-R4 -CosmosOfferThroughput 500 -ManagedIdentity $IdentityType -DisableCorsCredential -DisableSmartProxy

之後

New-AzHealthcareApisService -Name MyService -ResourceGroupName MyResourceGroup -Location MyLocation -Kind fhir-R4 -CosmosOfferThroughput 500 -IdentityType $IdentityType -AllowCorsCredential:$false -EnableSmartProxy:$false