Megosztás a következőn keresztül:


Migrálási útmutató az Az 7.0.0-hoz

Az.Accounts

Környezet- és fiókparancsmagok

A következő parancsmagok kimenete módosult:

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

Eltávolítva ServicePrincipalSecret és CertificatePassword be PSAzureRmAccount

Előtte

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

Utána

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

A kimenet tulajdonsága Upgrades a következőre Upgrademódosult: .

Előtte

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

Utána

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

A NetworkProfileId paraméter el lett távolítva, alternatívaként alhálózati azonosítót adott hozzá

Előtte

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}

Utána

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

A parancsvégrehajtási eredmény a parancsmag kimeneteként jelenik meg a websocket háttérbeli csatlakoztatásával

Előtte

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

Utána

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 a rendszer megerősítést kér. Ezt a viselkedést megkerülheti a beállítás megadásával -Force.

Előtte

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

Utána

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

New-AzFunctionApp

Ha FunctionsVersion a parancsmag végrehajtásakor New-AzFunctionApp nincs megadva paraméter, akkor az alapértelmezett Functions-verzió lesz beállítva 4.

There is no change to the usage.

Remove-AzFunctionApp

Ha ez az utolsó alkalmazás az App Service-csomagban, akkor a csomag nem törlődik. A kiadás előtt az alkalmazáscsomag is törlődik.

There is no change to the usage.

Az.HDInsight

New-AzHDInsightCluster

Az "OSType" Microsoft.Azure.Management.HDInsight.Models.OSType paraméter típusát a következőre módosította: System.string

There is no change to the usage.

New-AzHDInsightCluster, New-AzHDInsightClusterConfig

A "ClusterTier" Microsoft.Azure.Management.HDInsight.Models.ClusterTier paraméter típusát a következőre módosította: System.string

There is no change to the usage.

Set-AzHDInsightClusterDiskEncryptionKey, Set- AzHDInsightClusterSize

A kimeneti típus a "Microsoft.Azure.Management.HDInsight.Models.Cluster" típusról "Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightCluster" értékre módosult.

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

Cluster cmdlets

Az "AssignedIdentity" tulajdonság típusa a "Microsoft.Azure.Management.HDInsight.Models.ClusterIdentity" tulajdonságról "Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightClusterIdentity" típusra módosult.

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

Get-AzHDInsightProperties

A kimenet "VmSizes" tulajdonságának általános típusa a következőre System.Collections.Generic.IList1[System.String]módosultSystem.Collections.Generic.IDictionary2[System.String,Microsoft.Azure.Commands.HDInsight.Models.Management.AzureHDInsightVmSizesCapability]: .

Előtte

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

Utána

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

Az.KeyVault

New-AzKeyVaultRoleDefinition, Get-AzKeyVaultRoleDefinition

A modellben a PSKeyVaultPermission következő tulajdonságok lesznek átnevezve:

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

Előtte

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

Utána

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

A -DisplayName paraméter el lett távolítva.

Előtte

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

Utána

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

Az "EventName", "Category", "ResourceProviderName", "OperationName", "Status", "SubStatus" tulajdonság típusa a következőre Microsoft.Azure.Management.Monitor.Models.LocalizableString változott: System.String

Előtte

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

Utána

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

A "Unit" tulajdonság típusa a következőre módosult: System.String

There is no change to the usage.

New-AzMetricAlertRuleV2Criteria

A "TimeAggregation" tulajdonság típusa a következőre módosult: System.String

There is no change to the usage.

Az.OperationalInsights

Get-AzOperationalInsightsCluster

A "list" lett az alapértelmezett paraméterkészlet.

Előtte

There is no default parameter set.

Utána

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

Update-AzOperationalInsightsCluster

Az "UpdateByNameParameterSet" lett az alapértelmezett paraméterkészlet.

Előtte

There is no default parameter set.

Utána

Default parameter set is now "UpdateByNameParameterSet".

Az.RecoveryServices

Get-AzRecoveryServicesBackupContainer

A BackupManagementType típust a MARS-ról MAB-ra módosította. A funkciók változatlanok maradnak, ez a parancsmagok konzisztenciájának biztosítása.

Előtte

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

Utána

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

Get-AzRecoveryServicesBackupItem

A BackupManagementType típust a MARS-ról MAB-ra módosította. A funkciók változatlanok maradnak, ez a parancsmagok konzisztenciájának biztosítása

Előtte

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

Utána

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

Get-AzRecoveryServicesBackupJob

A BackupManagementType típust a MARS-ról MAB-ra módosította. A funkciók változatlanok maradnak, ez a parancsmagok konzisztenciájának biztosítása

Előtte

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

Utána

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

Az.Resources

AzAD cmdlets

Tekintse meg az Active Directory-parancsmagok áttelepítési útmutatóját .

PolicyAssignment cmdlets

A "Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.Policy.PsPolicyAssignment" tulajdonság "System.Management.Automation.PSObject" tulajdonságtípusa "Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.Policy.PsPolicyIdentity" típusra módosult.

Előtte

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

Utána

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

Az.Storage

Get-AzRmStorageShare

A "Name" paraméter el lett távolítva a "ShareResourceId" paraméterkészletből, mivel a név kikövetkeztethető az erőforrás-azonosítóból.

Előtte

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

Utána

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