你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Az 4.1.0 迁移指南

本文档介绍了 Az 版本 3.0.0 和 4.1.0 之间的变化。

Az.ApiManagement

Add-AzApiManagementRegion

Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementServiceIdentity 类型的 Type 属性的类型已从 Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementServiceIdentityType 更改为 System.String

New-AzApiManagement

  • cmdlet New-AzApiManagement 不再支持参数 AssignIdentity,找不到原始参数名称的别名。
  • 删除了 cmdlet New-AzApiManagement 的参数集 __AllParameterSets

Set-AzApiManagement

  • cmdlet Set-AzApiManagement 不再支持参数 AssignIdentity,找不到原始参数名称的别名。
  • 删除了 cmdlet Set-AzApiManagement 的参数集 __AllParameterSets

Get-AzApiManagementProperty

cmdlet Get-AzApiManagementProperty 已被 Get-AzApiManagementNamedValue 取代。

New-AzApiManagementProperty

cmdlet New-AzApiManagementProperty 已被 New-AzApiManagementNamedValue 取代。

Remove-AzApiManagementProperty

cmdlet Remove-AzApiManagementProperty 已被 Remove-AzApiManagementNamedValue 取代。

Set-AzApiManagementProperty

cmdlet Set-AzApiManagementProperty 已被 Set-AzApiManagementNamedValue 取代。

Az.Batch

Get-AzBatchApplicationNew-AzBatchApplication

Microsoft.Azure.Commands.Batch.Models.PSApplication 类型的属性 ApplicationPackages 已删除。

Get-AzBatchComputeNodeNew-AzBatchPool

删除了 Microsoft.Azure.Commands.Batch.Models.PSNetworkConfiguration 类型的属性 PublicIPs

Get-AzBatchApplicationPackageNew-AzBatchApplicationPackage

Microsoft.Azure.Commands.Batch.Models.PSApplicationPackage 类型的 StorageUrlExpiry 属性的类型已从 System.DateTime 更改为 System.DateTime?

Az.Compute

Remove-AzVmssDiagnosticsExtension

Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet 类型的 AutomaticRepairsPolicy 属性的类型已从 Microsoft.Azure.Commands.Compute.Automation.Models.PSAutomaticRepairsPolicy 更改为 Microsoft.Azure.Management.Compute.Models.AutomaticRepairsPolicy

Get-AzVMImage

  • cmdlet Get-AzVMImage 不再支持参数 FilterExpression,找不到原始参数名称的别名。
  • 删除了 cmdlet Get-AzVMImage 的参数集 ListVMImage

New-AzVMConfig

  • cmdlet New-AzVMConfig 不再支持参数 AssignIdentity,找不到原始参数名称的别名。
  • 删除了 cmdlet New-AzVMConfig 的参数集 AssignIdentityParameterSet

Update-AzVM

  • cmdlet Update-AzVM 不再支持参数 AssignIdentity,找不到原始参数名称的别名。
  • 删除了 cmdlet Update-AzVM 的参数集 AssignIdentityParameterSet

New-AzProximityPlacementGroup

  • 属性 VirtualMachinesVirtualMachineScaleSetsAvailabilitySets 的泛型类型已从 System.Collections.Generic.IList1[Microsoft.Azure.Management.Compute.Models.SubResource] 更改为 System.Collections.Generic.IList1[Microsoft.Azure.Management.Compute.Models.SubResourceWithColocationStatus]
  • 删除了类型 Microsoft.Azure.Commands.Compute.Automation.Models.PSProximityPlacementGroup 的属性 VirtualMachinesColocationStatusVirtualMachineScaleSetsColocationStatusAvailabilitySetsColocationStatus

之前

PS C:\> New-AzProximityPlacementGroup -ResourceGroupName $resourceGroupName -Name $proximityPlacementGroupName -Location $location -Tag @{key1 = 'val1'} | Format-List

ResourceGroupName                       : $resourceGroupName
ProximityPlacementGroupType             : Standard
VirtualMachinesColocationStatus         : {}
VirtualMachineScaleSetsColocationStatus : {}
AvailabilitySetsColocationStatus        : {}
ColocationStatus                        :
Id                                      : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/$resourceGroupName/providers/Microsoft.Compute/proximityPlacementGroups/$proximityPlacementGroupName
Name                                    : $proximityPlacementGroupName
Type                                    : Microsoft.Compute/proximityPlacementGroups
Location                                : $location
Tags                                    : {[key1, val1]}
VirtualMachines                         : {}
VirtualMachineScaleSets                 : {}
AvailabilitySets                        : {}

之后

PS C:\> New-AzProximityPlacementGroup -ResourceGroupName $resourceGroupName -Name $proximityPlacementGroupName -Location $location -Tag @{key1 = 'val1'} | Format-List

ResourceGroupName                       : $resourceGroupName
ProximityPlacementGroupType             : StandardColocationStatus                        :
Id                                      : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/$resourceGroupName/providers/Microsoft.Compute/proximityPlacementGroups/$proximityPlacementGroupName
Name                                    : $proximityPlacementGroupName
Type                                    : Microsoft.Compute/proximityPlacementGroups
Location                                : $location
Tags                                    : {[key1, val1]}
VirtualMachines                         : {}
VirtualMachineScaleSets                 : {}
AvailabilitySets                        : {}

Remove-AzProximityPlacementGroup

  • 属性 VirtualMachinesVirtualMachineScaleSetsAvailabilitySets 的泛型类型已从 System.Collections.Generic.IList1[Microsoft.Azure.Management.Compute.Models.SubResource] 更改为 System.Collections.Generic.IList1[Microsoft.Azure.Management.Compute.Models.SubResourceWithColocationStatus]
  • 删除了类型 Microsoft.Azure.Commands.Compute.Automation.Models.PSProximityPlacementGroup 的属性 VirtualMachinesColocationStatusVirtualMachineScaleSetsColocationStatusAvailabilitySetsColocationStatus

之前

PS C:\> Get-AzProximityPlacementGroup -ResourceGroupName $resourceGroupName -Name $proximityPlacementGroupName | Remove-AzProximityPlacementGroup | Format-List

ResourceGroupName                       : $resourceGroupName
ProximityPlacementGroupType             : Standard
VirtualMachinesColocationStatus         : {}
VirtualMachineScaleSetsColocationStatus : {}
AvailabilitySetsColocationStatus        : {}
ColocationStatus                        :
Id                                      : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/$resourceGroupName/providers/Microsoft.Compute/proximityPlacementGroups/$proximityPlacementGroupName
Name                                    : $proximityPlacementGroupName
Type                                    : Microsoft.Compute/proximityPlacementGroups
Location                                : $location
Tags                                    : {[key1, val1]}
VirtualMachines                         : {}
VirtualMachineScaleSets                 : {}
AvailabilitySets                        : {}

之后

PS C:\> Get-AzProximityPlacementGroup -ResourceGroupName $resourceGroupName -Name $proximityPlacementGroupName | Remove-AzProximityPlacementGroup | Format-List

ResourceGroupName                       : $resourceGroupName
ProximityPlacementGroupType             : StandardColocationStatus                        :
Id                                      : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/$resourceGroupName/providers/Microsoft.Compute/proximityPlacementGroups/$proximityPlacementGroupName
Name                                    : $proximityPlacementGroupName
Type                                    : Microsoft.Compute/proximityPlacementGroups
Location                                : $location
Tags                                    : {[key1, val1]}
VirtualMachines                         : {}
VirtualMachineScaleSets                 : {}
AvailabilitySets                        : {}

Get-AzProximityPlacementGroup

  • 属性 VirtualMachinesVirtualMachineScaleSetsAvailabilitySets 的泛型类型已从 System.Collections.Generic.IList1[Microsoft.Azure.Management.Compute.Models.SubResource] 更改为 System.Collections.Generic.IList1[Microsoft.Azure.Management.Compute.Models.SubResourceWithColocationStatus]
  • 删除了类型 Microsoft.Azure.Commands.Compute.Automation.Models.PSProximityPlacementGroup 的属性 VirtualMachinesColocationStatusVirtualMachineScaleSetsColocationStatusAvailabilitySetsColocationStatus

之前

PS C:\> Get-AzProximityPlacementGroup -ResourceGroupName $resourceGroupName -Name $proximityPlacementGroupName | Format-List

ResourceGroupName                       : $resourceGroupName
ProximityPlacementGroupType             : Standard
VirtualMachinesColocationStatus         : {}
VirtualMachineScaleSetsColocationStatus : {}
AvailabilitySetsColocationStatus        : {}
ColocationStatus                        :
Id                                      : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/$resourceGroupName/providers/Microsoft.Compute/proximityPlacementGroups/$proximityPlacementGroupName
Name                                    : $proximityPlacementGroupName
Type                                    : Microsoft.Compute/proximityPlacementGroups
Location                                : $location
Tags                                    : {[key1, val1]}
VirtualMachines                         : {}
VirtualMachineScaleSets                 : {}
AvailabilitySets                        : {}

之后

PS C:\> Get-AzProximityPlacementGroup -ResourceGroupName $resourceGroupName -Name $proximityPlacementGroupName | Format-List

ResourceGroupName                       : $resourceGroupName
ProximityPlacementGroupType             : StandardColocationStatus                        :
Id                                      : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/$resourceGroupName/providers/Microsoft.Compute/proximityPlacementGroups/$proximityPlacementGroupName
Name                                    : $proximityPlacementGroupName
Type                                    : Microsoft.Compute/proximityPlacementGroups
Location                                : $location
Tags                                    : {[key1, val1]}
VirtualMachines                         : {}
VirtualMachineScaleSets                 : {}
AvailabilitySets                        : {}

Add-AzVmssAdditionalUnattendContent

Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet 类型的 AutomaticRepairsPolicy 属性的类型已从 Microsoft.Azure.Commands.Compute.Automation.Models.PSAutomaticRepairsPolicy 更改为 Microsoft.Azure.Management.Compute.Models.AutomaticRepairsPolicy

Add-AzVmssDataDisk

Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet 类型的 AutomaticRepairsPolicy 属性的类型已从 Microsoft.Azure.Commands.Compute.Automation.Models.PSAutomaticRepairsPolicy 更改为 Microsoft.Azure.Management.Compute.Models.AutomaticRepairsPolicy

Add-AzVmssExtension

Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet 类型的 AutomaticRepairsPolicy 属性的类型已从 Microsoft.Azure.Commands.Compute.Automation.Models.PSAutomaticRepairsPolicy 更改为 Microsoft.Azure.Management.Compute.Models.AutomaticRepairsPolicy

Add-AzVmssNetworkInterfaceConfiguration

Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet 类型的 AutomaticRepairsPolicy 属性的类型已从 Microsoft.Azure.Commands.Compute.Automation.Models.PSAutomaticRepairsPolicy 更改为 Microsoft.Azure.Management.Compute.Models.AutomaticRepairsPolicy

Add-AzVmssSecret

Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet 类型的 AutomaticRepairsPolicy 属性的类型已从 Microsoft.Azure.Commands.Compute.Automation.Models.PSAutomaticRepairsPolicy 更改为 Microsoft.Azure.Management.Compute.Models.AutomaticRepairsPolicy

Add-AzVmssSshPublicKey

Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet 类型的 AutomaticRepairsPolicy 属性的类型已从 Microsoft.Azure.Commands.Compute.Automation.Models.PSAutomaticRepairsPolicy 更改为 Microsoft.Azure.Management.Compute.Models.AutomaticRepairsPolicy

Add-AzVmssWinRMListener

Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet 类型的 AutomaticRepairsPolicy 属性的类型已从 Microsoft.Azure.Commands.Compute.Automation.Models.PSAutomaticRepairsPolicy 更改为 Microsoft.Azure.Management.Compute.Models.AutomaticRepairsPolicy

New-AzVmssConfig

  • Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet 类型的 AutomaticRepairsPolicy 属性的类型已从 Microsoft.Azure.Commands.Compute.Automation.Models.PSAutomaticRepairsPolicy 更改为 Microsoft.Azure.Management.Compute.Models.AutomaticRepairsPolicy
  • 不再支持参数 AutomaticRepairMaxInstanceRepairsPercent,找不到原始参数名称的别名。
  • 不再支持参数 AssignIdentity,找不到原始参数名称的别名。
  • 删除了参数集 __AllParameterSets
  • 删除了参数集 ExplicitIdentityParameterSet
  • 删除了参数集 AssignIdentityParameterSet

Remove-AzVmssDataDisk

Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet 类型的 AutomaticRepairsPolicy 属性的类型已从 Microsoft.Azure.Commands.Compute.Automation.Models.PSAutomaticRepairsPolicy 更改为 Microsoft.Azure.Management.Compute.Models.AutomaticRepairsPolicy

Remove-AzVmssExtension

Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet 类型的 AutomaticRepairsPolicy 属性的类型已从 Microsoft.Azure.Commands.Compute.Automation.Models.PSAutomaticRepairsPolicy 更改为 Microsoft.Azure.Management.Compute.Models.AutomaticRepairsPolicy

Remove-AzVmssNetworkInterfaceConfiguration

Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet 类型的 AutomaticRepairsPolicy 属性的类型已从 Microsoft.Azure.Commands.Compute.Automation.Models.PSAutomaticRepairsPolicy 更改为 Microsoft.Azure.Management.Compute.Models.AutomaticRepairsPolicy

Set-AzVmssBootDiagnostic

Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet 类型的 AutomaticRepairsPolicy 属性的类型已从 Microsoft.Azure.Commands.Compute.Automation.Models.PSAutomaticRepairsPolicy 更改为 Microsoft.Azure.Management.Compute.Models.AutomaticRepairsPolicy

Set-AzVmssOsProfile

Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet 类型的 AutomaticRepairsPolicy 属性的类型已从 Microsoft.Azure.Commands.Compute.Automation.Models.PSAutomaticRepairsPolicy 更改为 Microsoft.Azure.Management.Compute.Models.AutomaticRepairsPolicy

Set-AzVmssRollingUpgradePolicy

Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet 类型的 AutomaticRepairsPolicy 属性的类型已从 Microsoft.Azure.Commands.Compute.Automation.Models.PSAutomaticRepairsPolicy 更改为 Microsoft.Azure.Management.Compute.Models.AutomaticRepairsPolicy

Set-AzVmssStorageProfile

Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet 类型的 AutomaticRepairsPolicy 属性的类型已从 Microsoft.Azure.Commands.Compute.Automation.Models.PSAutomaticRepairsPolicy 更改为 Microsoft.Azure.Management.Compute.Models.AutomaticRepairsPolicy

New-AzVmss

Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet 类型的 AutomaticRepairsPolicy 属性的类型已从 Microsoft.Azure.Commands.Compute.Automation.Models.PSAutomaticRepairsPolicy 更改为 Microsoft.Azure.Management.Compute.Models.AutomaticRepairsPolicy

Repair-AzVmssServiceFabricUpdateDomain

Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet 类型的 AutomaticRepairsPolicy 属性的类型已从 Microsoft.Azure.Commands.Compute.Automation.Models.PSAutomaticRepairsPolicy 更改为 Microsoft.Azure.Management.Compute.Models.AutomaticRepairsPolicy

Get-AzVmss

Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet 类型的 AutomaticRepairsPolicy 属性的类型已从 Microsoft.Azure.Commands.Compute.Automation.Models.PSAutomaticRepairsPolicy 更改为 Microsoft.Azure.Management.Compute.Models.AutomaticRepairsPolicy

Set-AzVmssOrchestrationServiceState

Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet 类型的 AutomaticRepairsPolicy 属性的类型已从 Microsoft.Azure.Commands.Compute.Automation.Models.PSAutomaticRepairsPolicy 更改为 Microsoft.Azure.Management.Compute.Models.AutomaticRepairsPolicy

Update-AzVmss

  • Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet 类型的 AutomaticRepairsPolicy 属性的类型已从 Microsoft.Azure.Commands.Compute.Automation.Models.PSAutomaticRepairsPolicy 更改为 Microsoft.Azure.Management.Compute.Models.AutomaticRepairsPolicy
  • 不再支持参数 AutomaticRepairMaxInstanceRepairsPercent,找不到原始参数名称的别名。
  • 删除了参数集 __AllParameterSets
  • 删除了参数集 ExplicitIdentityParameterSet

Add-AzVmssDiagnosticsExtension

Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet 类型的 AutomaticRepairsPolicy 属性的类型已从 Microsoft.Azure.Commands.Compute.Automation.Models.PSAutomaticRepairsPolicy 更改为 Microsoft.Azure.Management.Compute.Models.AutomaticRepairsPolicy

Disable-AzVmssDiskEncryption

Microsoft.Azure.Commands.Compute.Automation.Models.PSVirtualMachineScaleSet 类型的 AutomaticRepairsPolicy 属性的类型已从 Microsoft.Azure.Commands.Compute.Automation.Models.PSAutomaticRepairsPolicy 更改为 Microsoft.Azure.Management.Compute.Models.AutomaticRepairsPolicy

Az.KeyVault

New-AzKeyVaultCertificateOrganizationDetail

删除了别名 New-AzKeyVaultCertificateOrganizationDetails。 请使用 New-AzKeyVaultCertificateOrganizationDetail

之前

PS C:\> New-AzKeyVaultCertificateOrganizationDetails -AdministratorDetails $AdminDetails

之后

PS C:\> New-AzKeyVaultCertificateOrganizationDetail -AdministratorDetails $AdminDetails

New-AzKeyVaultCertificateAdministratorDetail

删除了别名 New-AzKeyVaultCertificateAdministratorDetails。 请使用 New-AzKeyVaultCertificateAdministratorDetail

之前

PS C:\> $AdminDetails = New-AzKeyVaultCertificateAdministratorDetails -FirstName 'Patti' -LastName 'Fuller' -EmailAddress 'patti.fuller@contoso.com' -PhoneNumber '5553334444'

之后

PS C:\> $AdminDetails = New-AzKeyVaultCertificateAdministratorDetail -FirstName 'Patti' -LastName 'Fuller' -EmailAddress 'patti.fuller@contoso.com' -PhoneNumber '5553334444'

New-AzKeyVault

删除了 -EnableSoftDelete,原因是默认启用了软删除。 如果不希望出现此行为,请使用 -DisableSoftDelete

之前

PS C:\> New-AzKeyVault -VaultName 'Contoso03Vault' -ResourceGroupName 'Group14' -Location 'East US' -EnableSoftDelete

之后

PS C:\> New-AzKeyVault -VaultName 'Contoso03Vault' -ResourceGroupName 'Group14' -Location 'East US'

Az.Monitor

Add-AzLogProfile

Microsoft.Azure.Commands.Insights.OutputClasses.PSLogProfile 类型的 RetentionPolicy 属性的类型已从 Microsoft.Azure.Management.Monitor.Management.Models.RetentionPolicy 更改为 Microsoft.Azure.Management.Monitor.Models.RetentionPolicy

Get-AzLogProfile

Microsoft.Azure.Commands.Insights.OutputClasses.PSLogProfile 类型的 RetentionPolicy 属性的类型已从 Microsoft.Azure.Management.Monitor.Management.Models.RetentionPolicy 更改为 Microsoft.Azure.Management.Monitor.Models.RetentionPolicy

New-AzMetricAlertRuleV2Criteria

删除了 cmdlet New-AzMetricAlertRuleV2Criteria 的参数集 __AllParameterSets

Az.Network

Get-AzNetworkWatcherConnectionMonitor

属性 RoundTripTimeMs 的泛型类型已从 System.Nullable1[System.Int32] 更改为 System.Nullable1[System.Double]

New-AzNetworkWatcherConnectionMonitorTestConfigurationObject

参数 SuccessThresholdRoundTripTimeMs 的泛型类型已从 System.Nullable1[System.Int32] 更改为 System.Nullable1[System.Double]

Az.OperationalInsights

Get-AzOperationalInsightsDataSource

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。

New-AzOperationalInsightsApplicationInsightsDataSource

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。

New-AzOperationalInsightsAzureActivityLogDataSource

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。

New-AzOperationalInsightsCustomLogDataSource

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。

New-AzOperationalInsightsLinuxPerformanceObjectDataSource

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。

New-AzOperationalInsightsLinuxSyslogDataSource

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。

New-AzOperationalInsightsWindowsEventDataSource

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。

New-AzOperationalInsightsWindowsPerformanceCounterDataSource

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。

Remove-AzOperationalInsightsDataSource

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。

Disable-AzOperationalInsightsIISLogCollection

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。

Disable-AzOperationalInsightsLinuxCustomLogCollection

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。

Disable-AzOperationalInsightsLinuxPerformanceCollection

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。

Disable-AzOperationalInsightsLinuxSyslogCollection

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。

Enable-AzOperationalInsightsIISLogCollection

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。

Enable-AzOperationalInsightsLinuxCustomLogCollection

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。

Enable-AzOperationalInsightsLinuxPerformanceCollection

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。

Enable-AzOperationalInsightsLinuxSyslogCollection

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。

Get-AzOperationalInsightsSavedSearch

Microsoft.Azure.Commands.OperationalInsights.Models.PSSearchListSavedSearchResponse 类型的属性 Metadata 已删除。

Get-AzOperationalInsightsSavedSearchResult

SDK 不再支持 cmdlet Get-AzOperationalInsightsSavedSearchResult,已将其删除。

Get-AzOperationalInsightsSearchResult

SDK 不再支持 cmdlet Get-AzOperationalInsightsSearchResult,已将其删除。

Get-AzOperationalInsightsStorageInsight

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。

New-AzOperationalInsightsStorageInsight

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。

Remove-AzOperationalInsightsStorageInsight

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。

Set-AzOperationalInsightsStorageInsight

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。

Get-AzOperationalInsightsLinkTarget

SDK 不再支持 cmdlet Get-AzOperationalInsightsLinkTarget,已将其删除。

Get-AzOperationalInsightsWorkspace

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。

New-AzOperationalInsightsWorkspace

  • Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。
  • cmdlet New-AzOperationalInsightsWorkspace 不再支持参数 CustomerId,找不到原始参数名称的别名。
  • 删除了 cmdlet New-AzOperationalInsightsWorkspace 的参数集 __AllParameterSets

Set-AzOperationalInsightsWorkspace

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。

Invoke-AzOperationalInsightsQuery

Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace 类型的属性 PortalUrl 已删除。

Az.Resources

Get-AzDeploymentScript

Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels.PsDeploymentScript 类型的 Status 属性的类型已从 Microsoft.Azure.Management.ResourceManager.Models.ScriptStatus 更改为 Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels.PsScriptStatus

Get-AzDeploymentScriptLog

Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels.PsDeploymentScript 类型的 Status 属性的类型已从 Microsoft.Azure.Management.ResourceManager.Models.ScriptStatus 更改为 Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels.PsScriptStatus

Save-AzDeploymentScriptLog

Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels.PsDeploymentScript 类型的 Status 属性的类型已从 Microsoft.Azure.Management.ResourceManager.Models.ScriptStatus 更改为 Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels.PsScriptStatus

Get-AzResourceLock, New-AzResourceLock, Remove-AzResourceLock, Set-AzResourceLock

删除了 TenantLevel 参数。

Get-AzPolicyAlias

属性 Aliases 的泛型类型已从 System.Collections.Generic.IList1[Microsoft.Azure.Management.ResourceManager.Models.AliasType] 更改为 System.Collections.Generic.IList1[Microsoft.Azure.Management.ResourceManager.Models.Alias]

New-AzPolicyAssignment

  • cmdlet New-AzPolicyAssignment 不再支持参数 PolicyDefinition 的类型 System.Management.Automation.PSObject
  • cmdlet New-AzPolicyAssignment 不再支持参数 PolicySetDefinition 的类型 System.Management.Automation.PSObject

Remove-AzDeploymentScript

Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels.PsDeploymentScript 类型的 Status 属性的类型已从 Microsoft.Azure.Management.ResourceManager.Models.ScriptStatus 更改为 Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels.PsScriptStatus

Az.Storage

Update-AzStorageAccountNetworkRuleSetGet-AzStorageAccountNetworkRuleSet

将 NetWorkRule DefaultAction 值从Allow = 1, Deny = 0 更改为了Allow = 0, Deny = 1。

New-AzStorageTableGet-AzStorageTable

输出对象 AzureStorageTable.CloudTable.ServiceClient 删除了 2 个属性:ConnectionPolicy、ConsistencyLevel。

Get-AzStorageFileRemove-AzStorageFileGet-AzStorageFileContentSet-AzStorageFileContentStart-AzStorageFileCopy

将输出类型从 CloudFile 更改为 AzureStorageFile,原始输出将变为新输出的子属性“CloudFile”

之前

PS C:\> $file = Get-AzStorageFile -ShareName $shareName -Path testfile -Context $ctx

PS C:\> Remove-AzStorageFile -File $file

之后

PS C:\> $file = Get-AzStorageFile -ShareName $shareName -Path testfile -Context $ctx

PS C:\> Remove-AzStorageFile -File $file.CloudFile

Get-AzStorageFileNew-AzStorageDirectoryRemove-AzStorageDirectory

将输出类型从 CloudFileDirectory 更改为 AzureStorageFileDirectory,原始输出将变为新输出的子属性“CloudFileDirectory”

之前

PS C:\> $dir = Get-AzStorageFile -ShareName $shareName -Path testdir -Context $ctx

PS C:\> Remove-AzStorageDirectory -Directory $dir

之后

PS C:\> $dir = Get-AzStorageFile -ShareName $shareName -Path testdir -Context $ctx

PS C:\> Remove-AzStorageDirectory -Directory $dir.CloudFileDirectory

Get-AzStorageShareNew-AzStorageShareRemove-AzStorageShare

将输出类型从 FileShareProperties 更改为 AzureStorageFileShare,原始输出将变为新输出的子属性“CloudFileShare”

之前

PS C:\> $share = Get-AzStorageShare -Name $shareName -Context $ctx

PS C:\> Remove-AzStorageShare -Share $share

之后

PS C:\> $share = Get-AzStorageShare -Name $shareName -Context $ctx

PS C:\> Remove-AzStorageShare -Share $share.CloudFileShare

Set-AzStorageShareQuota

将输出类型从 FileShareProperties 更改为 AzureStorageFileShare,原始输出将变为新输出的附属子属性“CloudFileShare.Properties”

之前

PS C:\> $shareProperties = Set-AzStorageShareQuota -Name $shareName -Quota 100 -Context $ctx

PS C:\> $shareProperties

ETag                LastModified                Quota
----                ------------                -----
"0x8D7F5BC7789FC63" 5/11/2020 3:03:30 PM +00:00   100

之后

PS C:\> $share = Set-AzStorageShareQuota -Name $shareName -Quota 100 -Context $ctx

PS C:\> $share

   File End Point: https://weiors1.file.core.windows.net/

Name     QuotaGiB LastModified                IsSnapshot SnapshotTime
----     -------- ------------                ---------- ------------
weitest1 100      5/11/2020 3:03:30 PM +00:00 False

PS C:\> $share.CloudFileShare.Properties

ETag                LastModified                Quota
----                ------------                -----
"0x8D7F5BC7789FC63" 5/11/2020 3:03:30 PM +00:00   100

Remove-AzStorageDirectory

删除具有父 Directory 对象和 -Path 的附属文件目录时,不能再从具有类型(字符串)匹配的管道输入 -Path。

之前

PS C:\> $dir = Get-AzStorageFile -ShareName $shareName -Path testdir -Context $ctx

PS C:\> @('dir1', 'dir2') | Remove-AzStorageDirectory -Directory $dir

之后

PS C:\> $dir = Get-AzStorageFile -ShareName $shareName -Path testdir -Context $ctx

PS C:\> $paths = @(
    [PSCustomObject]@{  Path = 'dir1 }
    [PSCustomObject]@{ Path = 'dir2' }
)

PS C:\> $paths | Remove-AzStorageDirectory -Directory $dir.CloudFileDirectory