다음을 통해 공유


Az 7.0.0 마이그레이션 가이드

Az.Accounts

컨텍스트 및 계정 cmdlet

다음 cmdlet의 출력이 변경되었습니다.

  • Get-AzContext
  • Remove-AzContext
  • Rename-AzContext
  • Select-AzContext
  • Connect-AzAccount
  • Disconnect-AzAccount
  • Import-AzContext
  • Save-AzContext

PSAzureRmAccount에서 ServicePrincipalSecretCertificatePassword가 제거됨

이전

PS C:\> $cred = Get-Credential
PS C:\> Connect-AzAccount -ServicePrincipal -Tenant 54826b22-xxxx-xxxx-xxxx-xxxxxxxxxxxxx -Credential $cred
PS C:\> (Get-AzContext).Account.ExtendedProperties

Key                    Value
---                    -----
CertificatePath        C:\certificate.pfx
CertificatePassword    password****
Tenants                54826b22-xxxx-xxxx-xxxx-xxxxxxxxxxxxx
ServicePrincipalSecret 7QK7Q********************************
Subscriptions          0b1f6471-xxxx-xxxx-xxxx-xxxxxxxxxxxxx

이후

PS C:\> $cred = Get-Credential
PS C:\> Connect-AzAccount -ServicePrincipal -Tenant 54826b22-xxxx-xxxx-xxxx-xxxxxxxxxxxxx -Credential $cred
PS C:\> (Get-AzContext).Account.ExtendedProperties

Key             Value
---             -----
CertificatePath C:\certificate.pfx
Tenants         54826b22-xxxx-xxxx-xxxx-xxxxxxxxxxxxx
Subscriptions   0b1f6471-xxxx-xxxx-xxxx-xxxxxxxxxxxxx

Az.Aks

Get-AzAksVersion

출력의 속성 UpgradesUpgrade로 변경되었습니다.

이전

PS C:\> (Get-AzAksVersion -location eastus).Upgrades

OrchestratorType OrchestratorVersion IsPreview
---------------- ------------------- ---------
Kubernetes       1.19.13
Kubernetes       1.20.7
Kubernetes       1.20.9
Kubernetes       1.20.7
Kubernetes       1.20.9
Kubernetes       1.20.9
Kubernetes       1.21.1
Kubernetes       1.21.2
Kubernetes       1.21.1
Kubernetes       1.21.2
Kubernetes       1.21.2
Kubernetes       1.22.1              True
Kubernetes       1.22.2              True
Kubernetes       1.22.1              True
Kubernetes       1.22.2              True
Kubernetes       1.22.2              True

이후

PS C:\> (Get-AzAksVersion -location eastus).Upgrade

OrchestratorType OrchestratorVersion IsPreview
---------------- ------------------- ---------
Kubernetes       1.19.13
Kubernetes       1.20.7
Kubernetes       1.20.9
Kubernetes       1.20.7
Kubernetes       1.20.9
Kubernetes       1.20.9
Kubernetes       1.21.1
Kubernetes       1.21.2
Kubernetes       1.21.1
Kubernetes       1.21.2
Kubernetes       1.21.2
Kubernetes       1.22.1              True
Kubernetes       1.22.2              True
Kubernetes       1.22.1              True
Kubernetes       1.22.2              True
Kubernetes       1.22.2              True

Az.ContainerInstance

New-AzContainerGroup

NetworkProfileId 매개 변수를 제거하고 SubnetId를 대안으로 추가했습니다.

이전

PS C:\>  $containerGroup = New-AzContainerGroup -ResourceGroupName test-rg -Name test-cg -Location eastus -Container $container -OsType Linux -NetworkProfileId "/subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}"
PS C:\> $containerGroup.NetworkProfileId

/subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}

이후

PS C:\> $container = New-AzContainerInstanceObject -Name test-container -Image nginx
PS C:\> $containerGroup = New-AzContainerGroup -ResourceGroupName test-rg -Name test-cg -Location eastus -Container $container -OsType Linux -RestartPolicy "Never" -IpAddressType 'Private' -SubnetId @{"Id"="/subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}"; "Name"="subnet"}
PS C:\> $containerGroup.SubnetId | fl

Id :  /subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}
Name : subnet

Invoke-AzContainerInstanceCommand

백엔드에서 websocket을 연결하여 명령 실행 결과를 cmdlet 출력으로 표시

이전

PS C:\> $websocket = Invoke-AzContainerInstanceCommand -ContainerGroupName test-cg -ContainerName test-container -ResourceGroupName test-rg -Command "echo hello" -TerminalSizeCol 12 -TerminalSizeRow 12
PS C:\> $websocket

Password                                           WebSocketUri
--------                                           ------------
****************** wss://bridge-linux-xx.eastus.management.azurecontainer.io/exec/caas-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/bridge-xxxxxxxxxxxxxxx?rows=12&cols=12api-version=2018-02-01-preview

User needs connect websocket using password to fetch command execution result

이후

PS C:\> Invoke-AzContainerInstanceCommand -ContainerGroupName test-cg -ContainerName test-container -ResourceGroupName test-rg -Command "echo hello"

hello

Az.Functions

Update-AzFunctionApp, Update-AzFunctionAppPlan

Update-AzFunctionApp은 확인을 묻는 메시지를 표시합니다. 이 동작은 -Force를 지정하여 무시할 수 있습니다.

이전

Update-AzFunctionApp -Name MyUniqueFunctionAppName -ResourceGroupName MyResourceGroupName -PlanName NewPlanName

이후

Update-AzFunctionApp -Name MyUniqueFunctionAppName -ResourceGroupName MyResourceGroupName -PlanName NewPlanName -Force

New-AzFunctionApp

New-AzFunctionApp cmdlet을 실행할 때 FunctionsVersion 매개 변수를 지정하지 않으면 기본 함수 버전이 4로 설정됩니다.

There is no change to the usage.

Remove-AzFunctionApp

앱 서비스 계획의 마지막 앱인 경우 계획이 삭제되지 않습니다. 이 릴리스 전에 앱 계획도 삭제됩니다.

There is no change to the usage.

Az.HDInsight

New-AzHDInsightCluster

매개 변수 "OSType"의 유형이 Microsoft.Azure.Management.HDInsight.Models.OSType에서 System.string으로 변경됨

There is no change to the usage.

New-AzHDInsightCluster, New-AzHDInsightClusterConfig

매개 변수 "ClusterTier"의 유형이 Microsoft.Azure.Management.HDInsight.Models.ClusterTier에서 System.string으로 변경됨

There is no change to the usage.

Set-AzHDInsightClusterDiskEncryptionKey, Set- AzHDInsightClusterSize

출력 유형이 'Microsoft.Azure.Management.HDInsight.Models.Cluster'에서 'Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightCluster'로 변경되었습니다.

All properties remain the same, so there is no change to the usage.

Cluster cmdlets

'AssignedIdentity' 속성 유형이 'Microsoft.Azure.Azure.Management.HDInsight.Models.ClusterIdentity'에서 'Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightClusterIdentity'로 변경했습니다.

All properties remain the same, so there is no change to the usage.

Get-AzHDInsightProperties

'property VmSizes' 출력의 제네릭 형식이 System.Collections.Generic.IDictionary2[System.String,Microsoft.Azure.Commands.HDInsight.Models.Management.AzureHDInsightVmSizesCapability]에서 System.Collections.Generic.IList1[System.String]로 변경되었습니다.

이전

PS C:\> $result = Get-AzHDInsightProperty -Location "South Central us"
PS C:\> $availableVmSizes = $result.VmSizes['iaas'].AvailableVmSizes

이후

PS C:\> $result = Get-AzHDInsightProperty -Location "South Central us"
PS C:\> $availableVmSizes = $result.VmSizes

Az.KeyVault

New-AzKeyVaultRoleDefinition, Get-AzKeyVaultRoleDefinition

PSKeyVaultPermission 모델의 다음 속성 이름이 변경되었습니다.

  • AllowedActions: >Actions
  • DeniedActions: >NotActions
  • AllowedDataActions: >DataActions
  • DeniedDataActions: >NotDataActions

이전

PS C:\> $backupRole = Get-AzKeyVaultRoleDefinition -HsmName myHsm -RoleDefinitionName "Managed HSM Backup User"

PS C:\> $backupRole.Permissions

AllowedActions DeniedActions AllowedDataActions DeniedDataActions
-------------- ------------- ------------------ -----------------
0 action(s)    0 action(s)   3 action(s)        0 action(s)

PS C:\> $backupRole.Permissions.AllowedDataActions

Microsoft.KeyVault/managedHsm/backup/start/action
Microsoft.KeyVault/managedHsm/backup/status/action
Microsoft.KeyVault/managedHsm/keys/backup/action

이후

PS C:\> $backupRole = Get-AzKeyVaultRoleDefinition -HsmName myHsm -RoleDefinitionName "Managed HSM Backup User"

PS C:\> $backupRole.Permissions

Actions     NotActions  DataActions NotDataActions
-------     ----------  ----------- --------------
0 action(s) 0 action(s) 3 action(s) 0 action(s)

PS C:\> $backupRole.Permissions.DataActions

Microsoft.KeyVault/managedHsm/backup/start/action
Microsoft.KeyVault/managedHsm/backup/status/action
Microsoft.KeyVault/managedHsm/keys/backup/action

Az.ManagedServices

New-AzManagedServicesDefinition

-DisplayName 매개 변수가 제거되었습니다.

이전

PS C:\> New-AzManagedServicesDefinition -DisplayName "MyTestDefinition" -ManagedByTenantId 72f9acbf-86f1-41af-91ab-2d7ef011db47 -RoleDefinitionId acdd72a7-3385-48ef-bd42-f606fba81ae7 -PrincipalId 714160ec-87d5-42bb-8b17-287c0dd7417d

이후

PS C:\> $permantAuth = New-AzManagedServicesAuthorizationObject -PrincipalId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -RoleDefinitionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -PrincipalIdDisplayName "Test user" -DelegatedRoleDefinitionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
PS C:\> New-AzManagedServicesDefinition -Name xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -RegistrationDefinitionName "Test definition" -ManagedByTenantId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -Authorization $permantAuth -Description "Test definition desc" -Scope "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Az.Monitor

Get-AzLog

속성 유형 'EventName', 'Category', 'ResourceProviderName', 'OperationName', 'Status', 'SubStatus가 Microsoft.Azure.Management.Monitor.Models.LocalizableString에서 System.String으로 변경되었습니다.

이전

PS C:\> $log = Get-AzLog -MaxRecord 1
PS C:\> $eventName = $log.EventName.LocalizedValue
PS C:\> $category = $log.Category.LocalizedValue
PS C:\> $resourceProviderName = $log.ResourceProviderName.LocalizedValue
PS C:\> $operationName = $log.OperationName.LocalizedValue
PS C:\> $status = $log.Status.LocalizedValue
PS C:\> $subStatus = $log.SubStatus.LocalizedValue

이후

PS C:\> $log = Get-AzLog -MaxRecord 1
PS C:\> $eventName = $log.EventName
PS C:\> $category = $log.Category
PS C:\> $resourceProviderName = $log.ResourceProviderName
PS C:\> $operationName = $log.OperationName
PS C:\> $status = $log.Status
PS C:\> $subStatus = $log.SubStatus

Get-AzMetric,Get-AzMetricDefinition

'Unit' 속성 유형이 System.String으로 변경되었습니다.

There is no change to the usage.

New-AzMetricAlertRuleV2Criteria

'TimeAggregation' 속성 유형이 System.String으로 변경되었습니다.

There is no change to the usage.

Az.OperationalInsights

Get-AzOperationalInsightsCluster

"list"를 기본 매개 변수 집합으로 만들었습니다.

이전

There is no default parameter set.

이후

Default parameter set is now "list", when providing resource group name - return all clusters for the given resource group.

Update-AzOperationalInsightsCluster

"UpdateByNameParameterSet"을 기본 매개 변수 집합으로 만들었습니다.

이전

There is no default parameter set.

이후

Default parameter set is now "UpdateByNameParameterSet".

Az.RecoveryServices

Get-AzRecoveryServicesBackupContainer

BackupManagementType을 MARS에서 MAB로 변경했습니다. 기능은 동일하게 유지됩니다. 이는 cmdlet 간에 일관성을 유지하기 위한 것입니다.

이전

$containers = Get-AzRecoveryServicesBackupContainer -ContainerType Windows -BackupManagementType MARS -VaultId $vault.ID

이후

$cont = Get-AzRecoveryServicesBackupContainer -ContainerType Windows -BackupManagementType MAB -VaultId $vault.ID

Get-AzRecoveryServicesBackupItem

BackupManagementType을 MARS에서 MAB로 변경했습니다. 기능은 동일하게 유지됩니다. 이는 cmdlet 간에 일관성을 유지하기 위한 것입니다.

이전

Get-AzRecoveryServicesBackupItem -BackupManagementType MARS -VaultId $vault.ID -WorkloadType FileFolder

이후

Get-AzRecoveryServicesBackupItem -BackupManagementType MAB -VaultId $vault.ID -WorkloadType FileFolder

Get-AzRecoveryServicesBackupJob

BackupManagementType을 MARS에서 MAB로 변경했습니다. 기능은 동일하게 유지됩니다. 이는 cmdlet 간에 일관성을 유지하기 위한 것입니다.

이전

Get-AzRecoveryServicesBackupJob -BackupManagementType MARS -VaultId $vault.ID

이후

Get-AzRecoveryServicesBackupJob -BackupManagementType MAB -VaultId $vault.ID

Az.Resources

AzAD cmdlets

Active Directory cmdlet의 마이그레이션 가이드를 참조하세요.

PolicyAssignment cmdlets

'Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.Policy.PsPolicyAssignment'의 'Identity' 속성 유형이 'System.Management.Automation.PSObject'에서 'Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.Policy.PsPolicyIdentity'로 변경되었습니다.

이전

PS C:\> $v = Get-AzPolicyAssignment -Id $someId
PS C:\> Write-Host $v.type, $v.principalId, $v.tenantId

이후

PS C:\> $v = Get-AzPolicyAssignment -Id $someId
PS C:\> Write-Host $v.IdentityType, $v.PrincipalId, $v.TenantId, $v.UserAssignedIdentities

Az.Storage

Get-AzRmStorageShare

리소스 ID에서 이름을 유추할 수 있기 때문에 매개 변수 "Name"이 매개 변수 집합 "ShareResourceId"에서 제거되었습니다.

이전

$StorageShare = Get-AzRmStorageShare -ResourceId "/subscriptions/..." -Name "MyStorageShare"

이후

$StorageShare = Get-AzRmStorageShare -ResourceId "/subscriptions/..."