Az 11.0.0 的移轉指南
Az.Aks
New-AzAksCluster
參數 'DockerBridgeCidr' 已從 Cmdlet 'New-AzAksCluster' 中移除,而且不會取代它。
Az.CloudService
Get-AzCloudServiceNetworkInterface
API 版本降級為 2021-03-01
。 會移除某些屬性。
- 已移除類型 'IDdosSettings' 的 'ProtectionMode' 和 'DdosProtectionPlanId'。
- 已移除類型 'ILoadBalancerBackendAddress' 的 'InboundNatRulesPortMapping' 和 'AdminState'。
- 'InboundNatRule' 和 'DrainPeriodInSecond' 已從類型 'IBackendAddressPool' 移除。
- 類型為「ISubnet」的「FlushConnection」已被移除。
- 已移除 'INetworkInterface' 類型的 'AuxiliaryMode'、'VnetEncryptionSupported'、和 'DisableTcpStateTracking'。
Az.Compute
New-AzDisk
在沒有提供任何映像或 SecurityType 值的磁碟建立時,預設會開啟 [信任啟動]。
以前
$diskconfig = New-AzDiskConfig -DiskSizeGB 127 -AccountType Premium_LRS -OsType Windows -CreateOption FromImage -Location $loc;
後
$diskconfig = New-AzDiskConfig -DiskSizeGB 127 -AccountType Premium_LRS -OsType Windows -CreateOption FromImage -Location $loc -SecurityType "Standard";
New-AzVM
已移除 CentOS、Debian、RHEL 和 UbuntuLTS 的 Linux 映像別名。 請改用別名 CentOS85Gen2、Debian11、RHELRaw8LVMGen2、Ubuntu2204。
以前
New-AzVM -ResourceGroupName MyResourceGroup -Name mytestvm -Location $loc -Credential $cred -DomainNameLabel $domainNameLabel -Image UbuntuLTS;
之後
New-AzVM -ResourceGroupName MyResourceGroup -Name mytestvm -Location $loc -Credential $cred -DomainNameLabel $domainNameLabel -Image Ubuntu2204;
New-AzVM
未提供任何映像檔或 SecurityType 值的情況下建立 VM 預設會啟用「信任啟動」。
以前
$result = New-AzVM -ResourceGroupName $rgname -Credential $vmCred -Name $vmName -DomainNameLabel $domainNameLabel ;
之後
$result = New-AzVM-ResourceGroupName $rgname -Credential $vmCred -Name $vmName -ImageName $imageName -DomainNameLabel $domainNameLabel -SecurityType "Standard";
New-AzVmss
已移除 CentOS、Debian、RHEL 和 UbuntuLTS 的 Linux 映像別名。 請改用別名 CentOS85Gen2、Debian11、RHELRaw8LVMGen2、Ubuntu2204。
New-AzVmss
使用此 Cmdlet 建立 Vms 現在預設為 OrchestrationMode:彈性。 只有在明確指定 “-OrchestrationMode Uniform” 時,才會以統一編排模式建立 VMSS。 當 OrchestrationMode 具有彈性時,也可以設定 UgradePolicy 和 SinglePlacementGroup。
以前
New-AzVmss
後
New-AzVmss
New-AzVmss
建立沒有提供任何映像或 SecurityType 值的 Vm,預設會開啟 [信任啟動]。
以前
$result = New-AzVmss -ResourceGroupName $rgname -Credential $vmCred -VMScaleSetName $vmssName1 -DomainNameLabel $domainNameLabel ;
後
$result = New-AzVmss -ResourceGroupName $rgname -Credential $vmCred -VMScaleSetName $vmssName1 -ImageName $imageName -DomainNameLabel $domainNameLabel -SecurityType "Standard";
Az.ContainerInstance
Get-AzContainerGroup
已修正這些輸出屬性中的錯字:'PreviouState' 'PreviouStateDetailStatus' 'PreviouStateExitCode' 'PreviouStateFinishTime' 'PreviouStateStartTime'。 受影響的 Cmdlet 包括:'Get-AzContainerGroup'、'Remove-AzContainerGroup'、'Restart-AzContainerGroup'、'Start-AzContainerGroup'、'Stop-AzContainerGroup'、'Update-AzContainerGroup'、'New-AzContainerInstanceObject'、'New-AzContainerInstanceInitDefinitionObject'
以前
$aci = Get-AzContainerGroup -ResourceGroupName 'rg name' -Name 'aci name'
$previousState = $aci.Property.Container.PreviouState
之後
$aci = Get-AzContainerGroup -ResourceGroupName 'rg name' -Name 'aci name'
$previousState = $aci.Property.Container.PreviousState
Az.DesktopVirtualization
New-AzWvdScalingPlan
此參數允許的值已從 'BYODesktop, Personal, Pooled' 變更為 'Pooled'
Az.Functions
Get-AzFunctionApp
此 Cmdlet 會隱藏傳回的函式應用程式的應用程式設定。先前會同時顯示索引鍵和值,但現在將只顯示索引鍵。
以前
Get-AzFunctionApp -Name <AppName> -ResourceGroupName <ResourceGroupName>
Name Value
---- -----
FUNCTIONS_EXTENSION_VERSION ~4
WEBSITE_CONTENTAZUREFILECONNE… <connection string>
AzureWebJobsStorage <connection string>
APPLICATIONINSIGHTS_CONNECTIO… <connection string>
APPINSIGHTS_INSTRUMENTATIONKEY <guid>
FUNCTIONS_WORKER_RUNTIME powershell
WEBSITE_CONTENTSHARE <share name>
之後
Get-AzFunctionApp -Name <AppName> -ResourceGroupName <ResourceGroupName>
WARNING: App settings have been redacted. Use the Get-AzFunctionAppSetting cmdlet to view them.
Name Value
---- -----
FUNCTIONS_EXTENSION_VERSION
WEBSITE_CONTENTAZUREFILECONNE…
AzureWebJobsStorage
APPLICATIONINSIGHTS_CONNECTIO…
APPINSIGHTS_INSTRUMENTATIONKEY
FUNCTIONS_WORKER_RUNTIME
WEBSITE_CONTENTSHARE
Update-AzFunctionAppSetting
此 Cmdlet 現在只會傳回更新的應用程式設定,而先前會傳回所有設定。
以前
Update-AzFunctionAppSetting -Name <AppName> -ResourceGroupName <ResourceGroupName> -AppSetting @{"foo3"="bar3"}
Name Value
---- -----
FUNCTIONS_EXTENSION_VERSION ~4
WEBSITE_CONTENTAZUREFILECONNE… <connection string>
foo3 bar3
AzureWebJobsStorage <connection string>
APPLICATIONINSIGHTS_CONNECTIO… <connection string>
APPINSIGHTS_INSTRUMENTATIONKEY <guid>
FUNCTIONS_WORKER_RUNTIME powershell
WEBSITE_CONTENTSHARE <share name>
後
Update-AzFunctionAppSetting -Name <AppName> -ResourceGroupName <ResourceGroupName> -AppSetting @{"foo3"="bar3"}
Name Value
---- -----
foo3 bar3
Az.KeyVault
New-AzKeyVaultManagedHsm
New-AzKeyVaultManagedHsm
中的參數 SoftDeleteRetentionInDays
變成強制
以前
New-AzKeyVaultManagedHsm -HsmName $hsmName -ResourceGroupName $rgName -Location $hsmLocation -Administrator $adminId
之後
New-AzKeyVaultManagedHsm -HsmName $hsmName -ResourceGroupName $rgName -Location $hsmLocation -Administrator $adminId -SoftDeleteRetentionInDays 7
Az.Monitor
Set-AzDataCollectionRule
已移除 Cmdlet 'Set-AzDataCollectionRule',而且找不到原始 Cmdlet 名稱的別名。
以前
Set-AzDataCollectionRule -Location 'East US 2 EUAP' `
-ResourceGroupName 'testdcr' `
-RuleName 'newDcr' `
-RuleFile 'C:\samples\dcr1.json' `
-Description 'Updated Description'
後
Update-AzDataCollectionRule -Name <String> -ResourceGroupName <String> [-SubscriptionId <String>]
[-DataCollectionEndpointId <String>] [-DataFlow <IDataFlow[]>]
[-DataSourceDataImportEventHubConsumerGroup <String>] [-DataSourceDataImportEventHubName <String>]
[-DataSourceDataImportEventHubStream <String>] [-DataSourceExtension <IExtensionDataSource[]>]
[-DataSourceIisLog <IIisLogsDataSource[]>] [-DataSourceLogFile <ILogFilesDataSource[]>]
[-DataSourcePerformanceCounter <IPerfCounterDataSource[]>]
[-DataSourcePlatformTelemetry <IPlatformTelemetryDataSource[]>]
[-DataSourcePrometheusForwarder <IPrometheusForwarderDataSource[]>] [-DataSourceSyslog <ISyslogDataSource[]>]
[-DataSourceWindowsEventLog <IWindowsEventLogDataSource[]>]
[-DataSourceWindowsFirewallLog <IWindowsFirewallLogsDataSource[]>] [-Description <String>]
[-DestinationAzureMonitorMetricName <String>] [-DestinationEventHub <IEventHubDestination[]>]
[-DestinationEventHubsDirect <IEventHubDirectDestination[]>]
[-DestinationLogAnalytic <ILogAnalyticsDestination[]>]
[-DestinationMonitoringAccount <IMonitoringAccountDestination[]>]
[-DestinationStorageAccount <IStorageBlobDestination[]>]
[-DestinationStorageBlobsDirect <IStorageBlobDestination[]>]
[-DestinationStorageTablesDirect <IStorageTableDestination[]>] [-IdentityType <String>] [-Kind <String>]
[-Location <String>] [-StreamDeclaration <Hashtable>] [-Tag <Hashtable>] [-UserAssignedIdentity <Hashtable>]
[-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
Get-AzDataCollectionRule
Cmdlet 'Get-AzDataCollectionRule' 不再有輸出類型 'Microsoft.Azure.Commands.Insights.OutputClasses.PSDataCollectionRuleResource'。 命令程式 'Get-AzDataCollectionRule' 不再支援參數 'DefaultProfile' 的別名 'AzureRmContext'。 Cmdlet 'Get-AzDataCollectionRule' 不再支持參數 'DefaultProfile' 的別名 'AzContext'。 Cmdlet 'Get-AzDataCollectionRule' 不再支持 'DefaultProfile' 參數的類型 'Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer'。
以前
Description : DCR description
DataSources : Microsoft.Azure.Commands.Insights.OutputClasses.PSDataCollectionRuleDataSources
Destinations : Microsoft.Azure.Commands.Insights.OutputClasses.PSDataCollectionRuleDestinations
DataFlows : {Microsoft.Azure.Commands.Insights.OutputClasses.PSDataFlow}
ProvisioningState : Succeeded
Etag : "{etag}"
Id : /subscriptions/{subId}/resourceGroups/testgroup/providers/Microsoft.Insights/dataCollectionRules/testDcr
Name : testDcr
Type : Microsoft.Insights/dataCollectionRules
Location : East US 2 EUAP
Tags : {[tag2, value2], [tag1, value1]}
之後
DataCollectionEndpointId :
DataFlow : {{
"streams": [ "Microsoft-InsightsMetrics" ],
"destinations": [ "azureMonitorMetrics-default" ]
}}
DataSourceDataImportEventHubConsumerGroup :
DataSourceDataImportEventHubName :
DataSourceDataImportEventHubStream :
DataSourceExtension :
DataSourceIisLog :
DataSourceLogFile :
DataSourcePerformanceCounter : {{
"streams": [ "Microsoft-InsightsMetrics" ],
"samplingFrequencyInSeconds": 60,
"counterSpecifiers": [ "\\Processor(_Total)\\% Processor Time" ],
"name": "perfCounter01"
}, {
"streams": [ "Microsoft-Perf" ],
"samplingFrequencyInSeconds": 15,
"counterSpecifiers": [ "\\Processor(_Total)\\% Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free Megabytes",
"\\PhysicalDisk(_Total)\\Avg. Disk Queue Length" ],
"name": "cloudTeamCoreCounters"
}}
DataSourcePlatformTelemetry :
DataSourcePrometheusForwarder :
DataSourceSyslog :
DataSourceWindowsEventLog :
DataSourceWindowsFirewallLog :
Description :
DestinationAzureMonitorMetricName : azureMonitorMetrics-default
DestinationEventHub :
DestinationEventHubsDirect :
DestinationLogAnalytic :
DestinationMonitoringAccount :
DestinationStorageAccount :
DestinationStorageBlobsDirect :
DestinationStorageTablesDirect :
Etag : "bb02d25d-0000-0100-0000-65017aed0000"
Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/AMCS-TEST/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule1
IdentityPrincipalId :
IdentityTenantId :
IdentityType :
IdentityUserAssignedIdentity : {
}
ImmutableId : dcr-2eebbe7e7a974226b2ef938194ada574
Kind :
Location : eastus
MetadataProvisionedBy :
MetadataProvisionedByResourceId :
Name : myCollectionRule1
ProvisioningState : Succeeded
ResourceGroupName : AMCS-TEST
StreamDeclaration : {
}
SystemDataCreatedAt : 9/13/2023 9:03:39 AM
SystemDataCreatedBy : v-jiaji@microsoft.com
SystemDataCreatedByType : User
SystemDataLastModifiedAt : 9/13/2023 9:03:39 AM
SystemDataLastModifiedBy : v-jiaji@microsoft.com
SystemDataLastModifiedByType : User
Tag : {
}
Type : Microsoft.Insights/dataCollectionRules
New-AzDataCollectionRule
Cmdlet 'New-AzDataCollectionRule' 不再具有輸出類型 'Microsoft.Azure.Commands.Insights.OutputClasses.PSDataCollectionRuleResource' Cmdlet 'New-AzDataCollectionRule' 不再具有輸出類型 'Microsoft.Azure.Commands.Insights.OutputClasses.PSDataCollectionRuleResource'。 Cmdlet 'New-AzDataCollectionRule' 不再支援參數 'DefaultProfile' 的類型 'Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer'。 Cmdlet 'New-AzDataCollectionRule' 不再支援參數 'DefaultProfile' 的別名 'AzContext'。 Cmdlet 'New-AzDataCollectionRule' 不再支持將參數 'DefaultProfile' 的別名設為 'AzureRmContext'。
以前
Description : DCR description
DataSources : Microsoft.Azure.Commands.Insights.OutputClasses.PSDataCollectionRuleDataSources
Destinations : Microsoft.Azure.Commands.Insights.OutputClasses.PSDataCollectionRuleDestinations
DataFlows : {Microsoft.Azure.Commands.Insights.OutputClasses.PSDataFlow}
ProvisioningState : Succeeded
Etag : "{etag}"
Id : /subscriptions/{subId}/resourceGroups/testgroup/providers/Microsoft.Insights/dataCollectionRules/testDcr
Name : testDcr
Type : Microsoft.Insights/dataCollectionRules
Location : East US 2 EUAP
Tags : {[tag2, value2], [tag1, value1]}
後
DataCollectionEndpointId :
DataFlow : {{
"streams": [ "Microsoft-InsightsMetrics" ],
"destinations": [ "azureMonitorMetrics-default" ]
}}
DataSourceDataImportEventHubConsumerGroup :
DataSourceDataImportEventHubName :
DataSourceDataImportEventHubStream :
DataSourceExtension :
DataSourceIisLog :
DataSourceLogFile :
DataSourcePerformanceCounter : {{
"streams": [ "Microsoft-InsightsMetrics" ],
"samplingFrequencyInSeconds": 60,
"counterSpecifiers": [ "\\Processor(_Total)\\% Processor Time" ],
"name": "perfCounter01"
}, {
"streams": [ "Microsoft-Perf" ],
"samplingFrequencyInSeconds": 15,
"counterSpecifiers": [ "\\Processor(_Total)\\% Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free Megabytes",
"\\PhysicalDisk(_Total)\\Avg. Disk Queue Length" ],
"name": "cloudTeamCoreCounters"
}}
DataSourcePlatformTelemetry :
DataSourcePrometheusForwarder :
DataSourceSyslog :
DataSourceWindowsEventLog :
DataSourceWindowsFirewallLog :
Description :
DestinationAzureMonitorMetricName : azureMonitorMetrics-default
DestinationEventHub :
DestinationEventHubsDirect :
DestinationLogAnalytic :
DestinationMonitoringAccount :
DestinationStorageAccount :
DestinationStorageBlobsDirect :
DestinationStorageTablesDirect :
Etag : "bb02d25d-0000-0100-0000-65017aed0000"
Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/AMCS-TEST/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule1
IdentityPrincipalId :
IdentityTenantId :
IdentityType :
IdentityUserAssignedIdentity : {
}
ImmutableId : dcr-2eebbe7e7a974226b2ef938194ada574
Kind :
Location : eastus
MetadataProvisionedBy :
MetadataProvisionedByResourceId :
Name : myCollectionRule1
ProvisioningState : Succeeded
ResourceGroupName : AMCS-TEST
StreamDeclaration : {
}
SystemDataCreatedAt : 9/13/2023 9:03:39 AM
SystemDataCreatedBy : v-jiaji@microsoft.com
SystemDataCreatedByType : User
SystemDataLastModifiedAt : 9/13/2023 9:03:39 AM
SystemDataLastModifiedBy : v-jiaji@microsoft.com
SystemDataLastModifiedByType : User
Tag : {
}
Type : Microsoft.Insights/dataCollectionRules
Get-AzDataCollectionRuleAssociation
Cmdlet 'Get-AzDataCollectionRuleAssociation' 不再支持 'InputObject' 參數的類型 'Microsoft.Azure.Commands.Insights.OutputClasses.PSDataCollectionRuleResource'。 Cmdlet 'Get-AzDataCollectionRuleAssociation' 不再支持參數 'DefaultProfile'' 的類型 'Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer'。
以前
Description :
DataCollectionRuleId : /subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.I
nsights/dataCollectionRules/{dcrName}
ProvisioningState :
Etag : "{etag}"
Id : /subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.C
ompute/virtualMachines/{vmName}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{assocName}
Name : {assocName}
Type : Microsoft.Insights/dataCollectionRuleAssociations
之後
DataCollectionEndpointId :
DataCollectionRuleId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/AMCS-TEST/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule2
Description :
Etag : "20017ecf-0000-0100-0000-651147350000"
Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/amcs-test/providers/microsoft.compute/virtualmachines/monitortestvm01/providers/Microsof
t.Insights/dataCollectionRuleAssociations/myCollectionRule2-association1
MetadataProvisionedBy :
MetadataProvisionedByResourceId :
Name : myCollectionRule2-association1
ProvisioningState :
ResourceGroupName : amcs-test
SystemDataCreatedAt : 9/25/2023 8:39:15 AM
SystemDataCreatedBy : v-jiaji@microsoft.com
SystemDataCreatedByType : User
SystemDataLastModifiedAt : 9/25/2023 8:39:15 AM
SystemDataLastModifiedBy : v-jiaji@microsoft.com
SystemDataLastModifiedByType : User
Type : Microsoft.Insights/dataCollectionRuleAssociations
New-AzDataCollectionRuleAssociation
Cmdlet 'New-AzDataCollectionRuleAssociation' 不再支持參數 'InputObject',而且找不到原始參數名稱的別名。 Cmdlet 'New-AzDataCollectionRuleAssociation' 不再支援參數 'DefaultProfile' 的類型 'Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer'。 Cmdlet 'New-AzDataCollectionRuleAssociation' 不再支持參數 'DefaultProfile' 的別名 'AzContext'。 Cmdlet 'New-AzDataCollectionRuleAssociation' 已不再支援參數 'DefaultProfile' 的別名 'AzureRmContext'。 已從 Cmdlet 'New-AzDataCollectionRuleAssociation' 中移除參數集 'ByInputObject'。
以前
$dcr = Get-AzDataCollectionRule -ResourceGroupName $rg -RuleName $dcrName
$vmId = '/subscriptions/{subId}/resourceGroups/{resourcegroup}/providers/Microsoft.Compute/virtualMachines/{vmName}'
$dcr | New-AzDataCollectionRuleAssociation -TargetResourceId $vmId -AssociationName "dcrAssocInput"
之後
New-AzDataCollectionRuleAssociation -AssociationName myCollectionRule2-association1 -ResourceUri /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/amcs-test/providers/microsoft.compute/virtualmachines/monitortestvm01 -DataCollectionRuleId /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/AMCS-TEST/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule2
Remove-AzDataCollectionRule
Cmdlet 'Remove-AzDataCollectionRule' 不再支持參數 'InputObject' 的類型 'Microsoft.Azure.Commands.Insights.OutputClasses.PSDataCollectionRuleResource'。 Cmdlet 「Remove-AzDataCollectionRule」 已不再支援參數「DefaultProfile」的類型「Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer」。 Cmdlet 'Remove-AzDataCollectionRule' 不再支持參數 'DefaultProfile' 的別名(即 'AzContext')。 Cmdlet 'Remove-AzDataCollectionRule' 已不再支援參數 'DefaultProfile' 的別名 'AzureRmContext'。
以前
Get-AzDataCollectionRule -ResourceGroupName "testdcr" -RuleName "dcrFromPipe95" | Remove-AzDataCollectionRule
後
Get-AzDataCollectionRule -ResourceGroupName "testdcr" -RuleName "dcrFromPipe95" | Remove-AzDataCollectionRule
Remove-AzDataCollectionRuleAssociation
Cmdlet 'Remove-AzDataCollectionRuleAssociation' 不再支援參數 'InputObject' 的類型 'Microsoft.Azure.Commands.Insights.OutputClasses.PSDataCollectionRuleAssociationProxyOnlyResource'。 Cmdlet 'Remove-AzDataCollectionRuleAssociation' 不再支持參數 'AssociationId',而且找不到原始參數名稱的別名。 Cmdlet 'Remove-AzDataCollectionRuleAssociation' 不再支持指定參數 'DefaultProfile' 的類型 'Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer'。 Cmdlet 'Remove-AzDataCollectionRuleAssociation' 不再支持參數 'DefaultProfile' 的別名 'AzContext'。 Cmdlet 'Remove-AzDataCollectionRuleAssociation' 不再支持針對參數 'DefaultProfile' 的別名 'AzureRmContext'。 已移除 Cmdlet 'Remove-AzDataCollectionRuleAssociation' 的參數集 'ByResourceId'。
以前
$dcrAssoc | Remove-AzDataCollectionRuleAssociation
Remove-AzDataCollectionRuleAssociation -AssociationId $dcrAssoc.Id
後
$dcrAssoc | Remove-AzDataCollectionRuleAssociation
Remove-AzDataCollectionRuleAssociation -InputObject $dcrAssoc.Id
Update-AzDataCollectionRule
Cmdlet 'Update-AzDataCollectionRule' 不再有輸出類型 'Microsoft.Azure.Commands.Insights.OutputClasses.PSDataCollectionRuleResource'。 Cmdlet 'Update-AzDataCollectionRule' 不再支持參數 'InputObject' 的類型 'Microsoft.Azure.Commands.Insights.OutputClasses.PSDataCollectionRuleResource'。 cmdlet 'Update-AzDataCollectionRule' 不再支持 'DefaultProfile' 參數的 'Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer' 類型。 Cmdlet 'Update-AzDataCollectionRule' 不再支持參數 'DefaultProfile' 的別名 'AzContext'。 Cmdlet 'Update-AzDataCollectionRule' 不再支持參數 'DefaultProfile' 的別名 'AzureRmContext'。
以前
$dcr = Get-AzDataCollectionRule -ResourceGroupName "testdcr" -Name "newDcr"
$dcr | Update-AzDataCollectionRule -Tag @{"tag1"="value1"; "tag2"="value2"}
之後
$dcr = Get-AzDataCollectionRule -ResourceGroupName "testdcr" -Name "newDcr"
$dcr | Update-AzDataCollectionRule -Tag @{"tag1"="value1"; "tag2"="value2"}
Get-AzActionGroup
Cmdlet 'Get-AzActionGroup' 不再具有輸出類型 'Microsoft.Azure.Commands.Insights.OutputClasses.PSActionGroupResource'。 Cmdlet 'Get-AzActionGroup' 不再支持參數 'DefaultProfile' 的類型 'Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer'。 Cmdlet 'Get-AzActionGroup' 不再支援參數 'DefaultProfile' 的別名 'AzContext'。 Cmdlet 'Get-AzActionGroup' 不再支持用於參數 'DefaultProfile' 的別名 'AzureRmContext'。
以前
Get-AzActionGroup -ResourceGroupName "Default-activityLogAlerts" -Name "actionGroup1"
後
Get-AzActionGroup -ResourceGroupName "Default-activityLogAlerts" -Name "actionGroup1"
ArmRoleReceiver : {}
AutomationRunbookReceiver : {}
AzureAppPushReceiver : {}
AzureFunctionReceiver : {}
EmailReceiver : {}
Enabled : False
EventHubReceiver : {}
GroupShortName : ag1
Id : /subscriptions/{subid}/resourceGroups/Monitor-Action/providers/microsoft.insights/actionGroups/actiongroup1
ItsmReceiver : {}
Location : northcentralus
LogicAppReceiver : {}
Name : actiongroup1
ResourceGroupName : Monitor-Action
SmsReceiver : {}
Tag : {
}
Type : Microsoft.Insights/ActionGroups
VoiceReceiver : {}
WebhookReceiver : {}
Remove-AzActionGroup
Cmdlet 'Remove-AzActionGroup' 不再支持參數 'InputObject' 的類型 'Microsoft.Azure.Commands.Insights.OutputClasses.PSActionGroupResource'。 已移除 Cmdlet 'Remove-AzActionGroup' 的參數集 'ByResourceId'。 Cmdlet 'Remove-AzActionGroup' 不再支持參數 'ResourceId',而且找不到原始參數名稱的別名。 Cmdlet 'Remove-AzActionGroup' 不再具有輸出類型 'Microsoft.Azure.AzureOperationResponse'。 Cmdlet 'Remove-AzActionGroup' 不再支援 'Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer' 類型作為參數 'DefaultProfile'。 Cmdlet 'Remove-AzActionGroup' 不再支持參數 'DefaultProfile' 的別名 'AzContext'。 Cmdlet 'Remove-AzActionGroup' 不再支援參數 'DefaultProfile' 的別名 'AzureRmContext'。
以前
Remove-AzActionGroup -ResourceGroupName "Default-Web-CentralUS" -Name "myActionGroup"
RequestId StatusCode
--------- ----------
2c6c159b-0e73-4a01-a67b-c32c1a0008a3 OK
後
Remove-AzActionGroup -ResourceGroupName Monitor-Action -Name actiongroup1 --PassThur
True
Set-AzActionGroup
已移除 Cmdlet 'Set-AzActionGroup',且找不到原始 Cmdlet 名稱的別名。
以前
$email1 = New-AzActionGroupReceiver -Name 'user1' -EmailReceiver -EmailAddress 'user1@example.com'
$sms1 = New-AzActionGroupReceiver -Name 'user2' -SmsReceiver -CountryCode '1' -PhoneNumber '5555555555'
Set-AzActionGroup -Name $actionGroupName -ResourceGroupName $resourceGroupName -ShortName $shortName -Receiver $email1,$sms1
後
$email1 = New-AzActionGroupEmailReceiverObject -EmailAddress user@example.com -Name user1
$sms1 = New-AzActionGroupSmsReceiverObject -CountryCode '{countrycode}' -Name user2 -PhoneNumber '{phonenumber}'
New-AzActionGroup -Name 'actiongroup1' -ResourceGroupName 'Monitor-Action' -Location northcentralus -GroupShortName ag1 -EmailReceiver $email1 -SmsReceiver $sms1
Test-AzActionGroup
參數 'Receiver' 的 Cmdlet 'Test-AzActionGroup' 不再支援類型 'System.Collections.Generic.List`1[Microsoft.Azure.Commands.Insights.OutputClasses.PSActionGroupReceiverBase]'。 Cmdlet 'Test-AzActionGroup' 不再有輸出類型 'Microsoft.Azure.Commands.Insights.OutputClasses.PSTestNotificationDetailsResponse'。 Cmdlet 'Test-AzActionGroup' 的參數集 'ByPropertyName' 不再是預設參數集。 Cmdlet 'Test-AzActionGroup' 不再支持參數 'DefaultProfile' 的 'Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer' 類型。 Cmdlet 'Test-AzActionGroup' 不再支持參數 'DefaultProfile' 的別名 'AzContext'。 Cmdlet 'Test-AzActionGroup' 不再支援參數 'DefaultProfile' 的別名 'AzureRmContext'。 已移除 Cmdlet 'Test-AzActionGroup' 的參數集 'ByPropertyName'。
以前
$email = New-AzActionGroupReceiver -Name 'user1' -EmailReceiver -EmailAddress 'test@test.example.com'
Test-AzActionGroup -AlertType servicehealth -Receiver $email -ResourceGroupName "test-RG" -ActionGroupName "test-AG"
之後
$sms1 = New-AzActionGroupSmsReceiverObject -CountryCode 86 -Name user1 -PhoneNumber 'phonenumber'
$email2 = New-AzActionGroupEmailReceiverObject -EmailAddress user@example.com -Name user2
Test-AzActionGroup -ActionGroupName actiongroup1 -ResourceGroupName monitor-action -AlertType servicehealth -Receiver $email2,$sms1
ActionDetail : {{
"MechanismType": "Email",
"Name": "user2",
"Status": "Succeeded",
"SubState": "Default",
"SendTime": "2023-11-08T05:16:09.6280455+00:00"
}, {
"MechanismType": "Sms",
"Name": "user1",
"Status": "Succeeded",
"SubState": "Default",
"SendTime": "2023-11-08T05:16:09.642967+00:00"
}}
CompletedTime : 2023-11-08T05:18:10.6755827+00:00
ContextNotificationSource : Microsoft.Insights/TestNotification
ContextType : Microsoft.Insights/ServiceHealth
CreatedTime : 2023-11-08T05:16:00.7951739+00:00
State : Complete
New-AzActionGroupReceiver
已移除 Cmdlet 'New-AzActionGroupReceiver',而且找不到對應於原始 Cmdlet 名稱的別名。
以前
$emailReceiver = New-AzActionGroupReceiver -Name 'emailReceiver1' -EmailReceiver -EmailAddress 'user1@example.com'
後
$emailReceiver = New-AzActionGroupEmailReceiverObject -EmailAddress user@example.com -Name user1
Az.Network
New-AzApplicationGatewayFirewallCustomRuleGroupByVariable
“Geo” 不再是 NewAzureApplicationGatewayFirewallCustomRuleGroupByVariable
中參數 VariableName
的有效輸入
Az.PowerBIEmbedded
Remove-AzPowerBIWorkspaceCollection
已移除 Cmdlet 'Remove-AzPowerBIWorkspaceCollection',因為不再支援 Workspace Collection。
Get-AzPowerBIWorkspaceCollection
cmdlet 'Get-AzPowerBIWorkspaceCollection' 已被移除,因為工作區集合已經不再受支援。
Get-AzPowerBIWorkspaceCollectionAccessKey
已移除 Cmdlet Get-AzPowerBIWorkspaceCollectionAccessKey,因為不再支援工作區集合功能。
Get-AzPowerBIWorkspace
已移除 Cmdlet 'Get-AzPowerBIWorkspace',因為工作區集合已不再受支援
New-AzPowerBIWorkspaceCollection
Cmdlet 'New-AzPowerBIWorkspaceCollection' 已被移除,因為工作區集合不再受支援。
Reset-AzPowerBIWorkspaceCollectionAccessKey
Cmdlet 'Reset-AzPowerBIWorkspaceCollectionAccessKey' 已被移除,因為不再支援工作區集區功能。
AZ.存儲
Get-AzStorageQueueStoredAcessPolicy
ouput 存取原則中的許可權會變更為字串,例如 “raup”
New-AzStorageAccountSasToken
已移除所建立 SAS 令牌的起始問號 '?'
New-AzStorageBlobSasToken
已移除所建立 SAS 令牌的開頭問號 '?'
New-AzStorageContainerSasToken
已移除所建立 SAS 令牌開頭的問號 '?'
New-AzStorageFileSasToken
已移除已建立的 SAS 令牌的前面的問號 '?'
New-AzStorageQueueSasToken
已移除所建立 SAS 令牌的前置問號 '?'
New-AzStorageShareSasToken
建立的 SAS 令牌的開始問號 '?' 已被移除
New-AzStorageTableSasToken
所建立的 SAS 令牌的開頭問號 '?' 已被移除
Set-AzStorageQueueStoredAccessPolicy
output 存取原則中的許可權已變更為字串,例如 "raup"