首页 > 解决方案 > Add-AzMetricAlertRuleV2 抛出“找不到名为...的指标”

问题描述

描述

我正在尝试使用 PS 脚本创建新的 Azure Monitor 警报。我在这里使用 MS 文档: https ://docs.microsoft.com/en-us/powershell/module/az.monitor/add-azmetricalertrulev2?view=azps-5.9.0

重现步骤

$condition = New-AzMetricAlertRuleV2Criteria -MetricName "SqlDbDtuUsageMetric" -MetricNameSpace "Microsoft.Sql/servers/databases" -TimeAggregation Average -Operator GreaterThan -Threshold 5

$act = New-AzActionGroup -ActionGroupId /subscriptions/{subscription_id}/resourceGroups/{resource_group}/providers/microsoft.insights/actionGroups/SqlDbDtuUsageAction

Add-AzMetricAlertRuleV2 -Name "SqlDbDtuUsageAlertGt5" -ResourceGroupName {resource_group} -WindowSize 00:05:00 -Frequency 00:05:00 -TargetResourceId "/subscriptions/{subscription_id}/resourceGroups/{resource_group}/providers/Microsoft.Sql/servers /{sql_server}/databases/vi{sql_db}" -Description "当最大使用 DTU > 20 时发出警报" -Severity 3 -ActionGroup $act -Condition $condition

错误输出

警告:09:04:18 - *** 在未来版本中,所有模型类的命名空间将从 Microsoft.Azure.Management.Monitor.Management.Models 更改为 Microsoft.Azure.Management.Monitor.Models。警告:09:04:18 - *** 输出类的命名空间将在未来版本中为所有类统一,​​以使其独立于模型类中的修改。详细:对目标“创建/更新警报规则:来自资源组的 SqlDbDtuUsageAlertGt5:vi-prod-be-cin-rg”执行“创建/更新警报规则”操作。Add-AzMetricAlertRuleV2:异常类型:ErrorResponseException,消息:找不到名为 metric1 的指标。确保名称正确。活动 ID:3e7e537e-43fc-40ad-8a84-745df33e1668.,代码:BadRequest,状态代码:BadRequest,原因短语:BadRequest 在行:1 字符:1

模块版本

目录:C:\Program Files\WindowsPowerShell\Modules

ModuleType 版本名称 ExportedCommands


脚本 2.2.5 Az.Accounts {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAutosave...} 脚本 1.6.3 Az.Accounts {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAutosave ...} 脚本 1.0.1 Az.Advisor {Get-AzAdvisorRecommendation, Enable-AzAdvisorRecommendation, Disable-AzAdvisorRecommendation, Get-AzAdvisorConfiguration...} 脚本 1.0.2 Az.Aks {Get-AzAks, New-AzAks, Remove-AzAks , Import-AzAksCredential...} 脚本 1.1.1 Az.AnalysisServices {Resume-AzAnalysisServicesServer, Suspend-AzAnalysisServicesServer, Get-AzAnalysisServicesServer, Remove-AzAnalysisServicesServer...} 脚本 1.3.2 Az.ApiManagement {Add-AzApiManagementApiToProduct, Add-AzApiManagementProductToGroup, Add-AzApiManagementRegion, Add-AzApiManagementUserToGroup...} 脚本 1.0.2 Az.ApplicationInsights {Get-AzApplicationInsights, New-AzApplicationInsights, Remove-AzApplicationInsights, Set-AzApplicationInsightsPricingPlan...} 脚本 1.3 .4 Az.Automation {Get-AzAutomationHybridWorkerGroup、Remove-AzAutomationHybridWorkerGroup、Get-AzAutomationJobOutputRecord、Import-AzAutomationDscNodeConfiguration...} 脚本 1.1.2 Az.Batch {Remove-AzBatchAccount、Get-AzBatchAccount、Get-AzBatchAccountKey、New-AzBatchAccount.. .} 脚本 1.0.1 Az.Billing {Get-AzBillingInvoice、Get-AzBillingPeriod、Get-AzEnrollmentAccount、Get-AzConsumptionBudget...} 脚本 1.3.1 Az.Cdn {Get-AzCdnProfile, Get-AzCdnProfileSsoUrl, New-AzCdnProfile, Remove-AzCdnProfile...} 脚本 1.2.1 Az.CognitiveServices {Get-AzCognitiveServicesAccount, Get-AzCognitiveServicesAccountKey, Get-AzCognitiveServicesAccountSku, Get- AzCognitiveServicesAccountType...} 脚本 2.7.0 Az.Compute {Remove-AzAvailabilitySet, Get-AzAvailabilitySet, New-AzAvailabilitySet, Update-AzAvailabilitySet...} 脚本 1.0.1 Az.ContainerInstance {New-AzContainerGroup, Get-AzContainerGroup, Remove- AzContainerGroup、Get-AzContainerInstanceLog} 脚本 1.1.0 Az.ContainerRegistry {New-AzContainerRegistry、Get-AzContainerRegistry、Update-AzContainerRegistry、Remove-AzContainerRegistry...} 脚本 1.0.0 Az。CosmosDB {Get-AzCosmosDBSqlContainer、Get-AzCosmosDBSqlContainerThroughput、Get-AzCosmosDBSqlDatabase、Get-AzCosmosDBSqlDatabaseThroughput...} 脚本 1.4.0 Az.DataFactory {Set-AzDataFactoryV2、Update-AzDataFactoryV2、Get-AzDataFactoryV2、Remove-AzDataFactoryV2...} 脚本 1.0 .1 Az.DataLakeAnalytics {Get-AzDataLakeAnalyticsDataSource、New-AzDataLakeAnalyticsCatalogCredential、Remove-AzDataLakeAnalyticsCatalogCredential、Set-AzDataLakeAnalyticsCatalogCredential...} 脚本 1.2.3 Az.DataLakeStore {Get-AzDataLakeStoreTrustedIdProvider、Remove-AzDataLakeStoreTrustedIdrustedIdProvider、Set.AzDataLakeStoreTrustedIdProvider、Set.AzDataLakeStoreTrustedIdProvider .} 脚本 1.0.1 Az.DeploymentManager {Get-AzDeploymentManagerArtifactSource,New-AzDeploymentManagerArtifactSource、Set-AzDeploymentManagerArtifactSource、Remove-AzDeploymentManagerArtifactSource...} 脚本 1.0.0 Az.DevTestLabs {Get-AzDtlAllowedVMSizesPolicy、Get-AzDtlAutoShutdownPolicy、Get-AzDtlAutoStartPolicy、Get-AzDtlVMsPerLabPolicy...} 脚本 1.1.1 Az.Dns { Get-AzDnsRecordSet、New-AzDnsRecordConfig、Remove-AzDnsRecordSet、Set-AzDnsRecordSet...} 脚本 1.2.2 Az.EventGrid {New-AzEventGridTopic、Get-AzEventGridTopic、Set-AzEventGridTopic、New-AzEventGridTopicKey...} 脚本 1.4.0 Az.EventHub {New-AzEventHubNamespace, Get-AzEventHubNamespace, Set-AzEventHubNamespace, Remove-AzEventHubNamespace...} 脚本 1.1.1 Az.FrontDoor {New-AzFrontDoor, Get-AzFrontDoor,Set-AzFrontDoor、Remove-AzFrontDoor...} 脚本 2.0.2 Az.HDInsight {Get-AzHDInsightJob、New-AzHDInsightSqoopJobDefinition、Wait-AzHDInsightJob、New-AzHDInsightStreamingMapReduceJobDefinition...} 脚本 1.0.0 Az.HealthcareApis {New-AzHealthcareApisService、 Remove-AzHealthcareApisService、Set-AzHealthcareApisService、Get-AzHealthcareApisService} 脚本 1.3.1 Az.IotHub {Add-AzIotHubKey、Get-AzIotHubEventHubConsumerGroup、Get-AzIotHubConnectionString、Get-AzIotHubJob...} 脚本 1.3.1 Az.KeyVault {Add-AzKeyVaultCertificate , Update-AzKeyVaultCertificate, Stop-AzKeyVaultCertificateOperation, Get-AzKeyVaultCertificateOperation...} 脚本 1.3.1 Az.LogicApp {Get-AzIntegrationAccountAgreement,Get-AzIntegrationAccountAssembly、Get-AzIntegrationAccountBatchConfiguration、Get-AzIntegrationAccountCallbackUrl...} 脚本 1.1.1 Az.MachineLearning {Move-AzMlCommitmentAssociation、Get-AzMlCommitmentAssociation、Get-AzMlCommitmentPlanUsageHistory、Remove-AzMlCommitmentPlan...} 脚本 1.0.1 Az.ManagedServices { Get-AzManagedServicesAssignment、New-AzManagedServicesAssignment、Remove-AzManagedServicesAssignment、Get-AzManagedServicesDefinition...} 脚本 1.0.1 Az.MarketplaceOrdering {Get-AzMarketplaceTerms、Set-AzMarketplaceTerms} 脚本 1.1.0 Az.Media {Sync-AzMediaServiceStorageKey、Set-AzMediaServiceKey 、Get-AzMediaServiceKey、Get-AzMediaServiceNameAvailability...} 脚本 1.4.0 Az。监控 {Get-AzMetricDefinition、Get-AzMetric、Remove-AzLogProfile、Get-AzLogProfile...} 脚本 1.15.0 Az.Network {Add-AzApplicationGatewayAuthenticationCertificate、Get-AzApplicationGatewayAuthenticationCertificate、New-AzApplicationGatewayAuthenticationCertificate、Remove-AzApplicationGatewayAuthenticationCertificate...} 脚本 1.1 .0 Az.NotificationHubs {Get-AzNotificationHub、Get-AzNotificationHubAuthorizationRule、Get-AzNotificationHubListKey、Get-AzNotificationHubPNSCredential...} 脚本 1.3.3 Az.OperationalInsights {New-AzOperationalInsightsAzureActivityLogDataSource、New-AzOperationalInsightsCustomLogDataSource、Disable-AzOperationalInsightsLinuxCustomLogInsightsCollection、Disable-Az.LogDataSource .} 脚本 1.1。3 Az.PolicyInsights {Get-AzPolicyEvent、Get-AzPolicyState、Get-AzPolicyStateSummary、Get-AzPolicyRemediation...} 脚本 1.1.0 Az.PowerBIEmbedded {Remove-AzPowerBIWorkspaceCollection、Get-AzPowerBIWorkspaceCollection、Get-AzPowerBIWorkspaceCollectionAccessKey、Get-AzPowerBIWorkspace... } 脚本 1.4.5 Az.RecoveryServices {Get-AzRecoveryServicesBackupProperty、Get-AzRecoveryServicesVault、Get-AzRecoveryServicesVaultSettingsFile、New-AzRecoveryServicesVault...} 脚本 1.1.1 Az.RedisCache {Remove-AzRedisCachePatchSchedule、New-AzRedisCacheScheduleEntry、Get-AzRedisCachePatchSchedule、New- AzRedisCachePatchSchedule...} 脚本 1.0.2 Az.Relay {New-AzRelayNamespace、Get-AzRelayNamespace、Set-AzRelayNamespace、Remove-AzRelayNamespace...} 脚本 1.7.0 Az.Resources {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzRoleAssignment, New-AzRoleAssignment...} 脚本 1.4.0 Az.ServiceBus {New-AzServiceBusNamespace, Get-AzServiceBusNamespace, Set-AzServiceBusNamespace, Remove-AzServiceBusNamespace...} 脚本 1.2.0 Az.ServiceFabric {Add-AzServiceFabricApplicationCertificate, Add-AzServiceFabricClientCertificate, Add-AzServiceFabricClusterCertificate, Add-AzServiceFabricNode...} 脚本 1.1.0 Az.SignalR {New-AzSignalR, Get-AzSignalR、Get-AzSignalRKey、New-AzSignalRKey...} 脚本 1.15.0 Az.Sql {Get-AzSqlDatabaseTransparentDataEncryption、Get-AzSqlDatabaseTransparentDataEncryptionActivity、Set-AzSqlDatabaseTransparentDataEncryption、Get-AzSqlDatabaseUpgradeHint...} 脚本 1.8.0 Az.Storage {Get-AzStorageAccount、Get-AzStorageAccountKey、New-AzStorageAccount、New-AzStorageAccountKey...} 脚本 1.2.1 Az.StorageSync {Invoke-AzStorageSyncCompatibilityCheck、 New-AzStorageSyncService、Get-AzStorageSyncService、Remove-AzStorageSyncService...} 脚本 1.0.0 Az.StreamAnalytics {Get-AzStreamAnalyticsFunction、Get-AzStreamAnalyticsDefaultFunctionDefinition、New-AzStreamAnalyticsFunction、Remove-AzStreamAnalyticsFunction...} 脚本 1.0.2 Az.TrafficManager {添加-AzTrafficManagerCustomHeaderToEndpoint、删除-AzTrafficManagerCustomHeaderFromEndpoint、添加-AzTrafficManagerCustomHeaderToProfile、Remove-AzTrafficManagerCustomHeaderFromProfile...} 脚本 1.5.0 Az.Websites {Get-AzAppServicePlan, Set-AzAppServicePlan, New-AzAppServicePlan, Remove-AzAppServicePlan...} 脚本 5.1.2 Azure {Get-AzureAutomationCertificate, Get-AzureAutomationConnection, New- AzureAutomationConnection, Remove-AzureAutomationConnection...} 脚本 5.8.3 AzureRM.profile {Disable-AzureRmDataCollection, Disable-AzureRmContextAutosave, Enable-AzureRmDataCollection, Enable-AzureRmContextAutosave...} 脚本 1.0.1 Microsoft.PowerShell.Operation.V... {Get-OperationValidation, Invoke-OperationValidation} 二进制 1.0.0.1 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...} 脚本 3.4。0 Pester {Describe, Context, It, Should...} 脚本 1.0.0.1 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Module...} 脚本 2.0.0 PSReadline {Get-PSReadLineKeyHandler, Set -PSReadLineKeyHandler、删除-PSReadLineKeyHandler、获取-PSReadLineOption...}

  Directory: C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules

ModuleType 版本名称 ExportedCommands


清单 1.0.0.0 AppBackgroundTask {Disable-AppBackgroundTaskDiagnosticLog, Enable-AppBackgroundTaskDiagnosticLog, Set-AppBackgroundTaskResourcePolicy, Unregister-AppBackgroundTask...} 清单 2.0.0.0 AppLocker {Get-AppLockerFileInformation, Get-AppLockerPolicy, New-AppLockerPolicy, Set-AppLockerPolicy...}清单 1.0.0.0 AppvClient {Add-AppvClientConnectionGroup, Add-AppvClientPackage, Add-AppvPublishingServer, Disable-Appv...} 清单 2.0.1.0 Appx {Add-AppxPackage, Get-AppxPackage, Get-AppxPackageManifest, Remove-AppxPackage...}脚本 1.0.0.0 AssignedAccess {Clear-AssignedAccess, Get-AssignedAccess, Set-AssignedAccess} 清单 1.0.0.0 BitLocker {Unlock-BitLocker,Suspend-BitLocker, Resume-BitLocker, Remove-BitLockerKeyProtector...} Manifest 2.0.0.0 BitsTransfer {Add-BitsFile, Complete-BitsTransfer, Get-BitsTransfer, Remove-BitsTransfer...} Manifest 1.0.0.0 BranchCache {Add-BCDataCacheExtension,清除-BCCache、禁用-BC、禁用-BCDowngrading...} 清单 1.0.0.0 CimCmdlets {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance, Get-CimSession...} 清单 1.0 ConfigCI {Get-SystemDriver, New- CIPolicyRule, New-CIPolicy, Get-CIPolicy...} Manifest 1.0 ConfigDefender {Get-MpPreference, Set-MpPreference, Add-MpPreference, Remove-MpPreference...} Manifest 1.0 Defender {Get-MpPreference, Set-MpPreference, Add-议员偏好,Remove-MpPreference...} 清单 1.0.2.0 DeliveryOptimization {Delete-DeliveryOptimizationCache, Set-DeliveryOptimizationStatus, Get-DeliveryOptimizationLog, Get-DeliveryOptimizationLogAnalysis...} 清单 1.0.0.0 DirectAccessClientComponents {Disable-DAManualEntryPointSelection, Enable-DAManualEntryPointSelection, Get-DAClientExperienceConfiguration, Get-DAEntryPointTableItem...} 脚本 3.0 Dism {Add-AppxProvisionedPackage、Add-WindowsDriver、Add-WindowsCapability、Add-WindowsImage...} 清单 1.0.0.0 DnsClient {Resolve-DnsName、Clear-DnsClientCache、Get-DnsClient、Get- DnsClientCache...} 清单 1.0.0.0 EventTracingManagement {Start-EtwTraceSession、New-EtwTraceSession、Get-EtwTraceSession、Update-EtwTraceSession...清单 1.0.0.0 HgsClient {Get-HgsAttestationBaselinePolicy, Get-HgsClientConfiguration, Test-HgsClientConfiguration, Set-HgsClientConfiguration...} 清单 1.0.0.0 HgsDiagnostics {New-HgsTraceTarget, Get-HgsTrace, Get-HgsTraceFileData, Test-HgsTraceTarget} 二进制 1.0 .0.0 HostComputeService {Get-ComputeProcess, Stop-ComputeProcess} 清单 1.0.0.1 HostNetworkingService {Remove-HnsNamespace, Remove-HnsEndpoint, Get-HnsEndpoint, Remove-HnsPolicyList...} 二进制 2.0.0.0 Hyper-V {Add-VMAssignableDevice, Add -VMDvdDrive, Add-VMFibreChannelHba, Add-VMGpuPartitionAdapter...} 二进制 1.1 Hyper-V {Add-VMDvdDrive, Add-VMFibreChannelHba, Add-VMHardDiskDrive, Add-VMMigrationNetwork...清单 2.0.0.0 国际 {Get-WinDefaultInputMethodOverride、Set-WinDefaultInputMethodOverride、Get-WinHomeLocation、Set-WinHomeLocation...} 清单 1.0.0.0 iSCSI {Get-IscsiTargetPortal、New-IscsiTargetPortal、Remove-IscsiTargetPortal、Update-IscsiTargetPortal... } 脚本 1.0.0.0 ISE {New-IseSnippet、Import-IseSnippet、Get-IseSnippet} 清单 1.0.0.0 Kds {Add-KdsRootKey、Get-KdsRootKey、Test-KdsRootKey、Set-KdsConfiguration...} 清单 1.0.1.0 Microsoft。 PowerShell.Archive {Compress-Archive, Expand-Archive} 清单 3.0.0.0 Microsoft.PowerShell.Diagnostics {Get-WinEvent, Get-Counter, Import-Counter, Export-Counter...} 清单 3.0.0.0 Microsoft.PowerShell。主机 {Start-Transcript, Stop-Transcript} Manifest 1.0.0.0 Microsoft.PowerShell.LocalAccounts {Add-LocalGroupMember, Disable-LocalUser, Enable-LocalUser, Get-LocalGroup...} Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add -Content, Clear-Content, Clear-ItemProperty, Join-Path...} 脚本 1.0 Microsoft.PowerShell.ODataUtils Export-ODataEndpointProxy Manifest 3.0.0.0 Microsoft.PowerShell.Security {Get-Acl, Set-Acl, Get-PfxCertificate, Get-Credential...} Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Format-List、Format-Custom、Format-Table、Format-Wide...} Manifest 3.0.0.0 Microsoft.WSMan.Management {Disable-WSManCredSSP, Enable-WSManCredSSP、Get-WSManCredSSP、Set-WSManQuickConfig...} 清单 1.0 MMAgent {Disable-MMAgent、Enable-MMAgent、Set-MMAgent、Get-MMAgent...} Manifest 1.0.0.0 MsDtc {New-DtcDiagnosticTransaction、Complete-DtcDiagnosticTransaction、Join-DtcDiagnosticResourceManager、Receive-DtcDiagnosticTransaction...} 清单 2.0.0.0 NetAdapter {Disable-NetAdapter、 Disable-NetAdapterBinding、Disable-NetAdapterChecksumOffload、Disable-NetAdapterEncapsulatedPacketTaskOffload...} Manifest 1.0.0.0 NetConnection {Get-NetConnectionProfile, Set-NetConnectionProfile} Manifest 1.0.0.0 NetDiagnostics Get-NetView Manifest 1.0.0.0 NetEventPacketCapture {New-NetEventSession, Remove-NetEventSession , Get-NetEventSession, Set-NetEventSession...} 清单 2.0.0.0 NetLbfo {Add-NetLbfoTeamMember,Add-NetLbfoTeamNic、Get-NetLbfoTeam、Get-NetLbfoTeamMember...} 清单 1.0.0.0 NetNat {Get-NetNat、Get-NetNatExternalAddress、Get-NetNatStaticMapping、Get-NetNatSession...} 清单 2.0.0.0 NetQos {Get-NetQosPolicy、 Set-NetQosPolicy, Remove-NetQosPolicy, New-NetQosPolicy} 清单 2.0.0.0 NetSecurity {Get-DAPolicyChange, New-NetIPsecAuthProposal, New-NetIPsecMainModeCryptoProposal, New-NetIPsecQuickModeCryptoProposal...} 清单 1.0.0.0 NetSwitchTeam {New-NetSwitchTeam, Remove-NetSwitchTeam , Get-NetSwitchTeam, Rename-NetSwitchTeam...} 清单 1.0.0.0 NetTCPIP {Get-NetIPAddress, Get-NetIPInterface, Get-NetIPv4Protocol, Get-NetIPv6Protocol...} 清单 1.0.0。0 NetworkConnectivityStatus {Get-DAConnectionStatus、Get-NCSIPolicyConfiguration、Reset-NCSIPolicyConfiguration、Set-NCSIPolicyConfiguration} 清单 1.0.0.0 NetworkSwitchManager {Disable-NetworkSwitchEthernetPort、Enable-NetworkSwitchEthernetPort、Get-NetworkSwitchEthernetPort、Remove-NetworkSwitchEthernetPortIPAddress...} 清单 1.0.0.0 NetworkTransition {添加-NetIPHttpsCertBinding、禁用-NetDnsTransitionConfiguration、禁用-NetIPHttpsProfile、禁用-NetNatTransitionConfiguration...} 清单 1.0.0.0 PcsvDevice {Get-PcsvDevice, Start-PcsvDevice, Stop-PcsvDevice, Restart-PcsvDevice...} 二进制 1.0.0.0 PersistentMemory { Get-PmemDisk、Get-PmemPhysicalDevice、Get-PmemUnusedRegion、New-PmemDisk...} 清单 1.0.0。0 PKI {Add-CertificateEnrollmentPolicyServer、Export-Certificate、Export-PfxCertificate、Get-CertificateAutoEnrollmentPolicy...} Manifest 1.0.0.0 PnpDevice {Get-PnpDevice、Get-PnpDeviceProperty、Enable-PnpDevice、Disable-PnpDevice} Manifest 1.1 PrintManagement {Add-打印机、Add-PrinterDriver、Add-PrinterPort、Get-PrintConfiguration...} 二进制 1.0.12 ProcessMitigations {Get-ProcessMitigation、Set-ProcessMitigation、ConvertTo-ProcessMitigationPolicy} 脚本 3.0 配置 {Install-ProvisioningPackage、Export-ProvisioningPackage、Install-TrustedProvisioningCertificate , Export-Trace...} Manifest 1.1 PSDesiredStateConfiguration {Set-DscLocalConfigurationManager,Start-DscConfiguration, Test-DscConfiguration, Publish-DscConfiguration...} 脚本 1.0.0.0 PSDiagnostics {Disable-PSTrace, Disable-PSWSManCombinedTrace, Disable-WSManTrace, Enable-PSTrace...} 二进制 1.1.0.0 PSScheduledJob {New-JobTrigger, Add-JobTrigger, Remove-JobTrigger, Get-JobTrigger...} Manifest 2.0.0.0 PSWorkflow {New-PSWorkflowExecutionOption, New-PSWorkflowSession, nwsn} Manifest 1.0.0.0 PSWorkflowUtility Invoke-AsWorkflow Manifest 1.0.0.0 ScheduledTasks {Get-ScheduledTask, Set -ScheduledTask, Register-ScheduledTask, Unregister-ScheduledTask...} 清单 2.0.0.0 SecureBoot {Confirm-SecureBootUEFI, Set-SecureBootUEFI, Get-SecureBootUEFI, Format-SecureBootUEFI...} 清单 3.1。0.0 ServiceFabric {Get-ServiceFabricServiceName, Get-ServiceFabricApplicationName, Approve-ServiceFabricRepairTask, Remove-ServiceFabricTestState...} 清单 2.0.0.0 SmbShare {Get-SmbShare, Remove-SmbShare, Set-SmbShare, Block-SmbShareAccess...} 清单 2.0。 0.0 SmbWitness {Get-SmbWitnessClient, Move-SmbWitnessClient, gsmbw, msmbw...} 清单 1.0.0.1 StartLayout {Export-StartLayout, Import-StartLayout, Export-StartLayoutEdgeAssets, Get-StartApps} 清单 2.0.0.0 存储 {Add-InitiatorIdToMaskingSet, Add-PartitionAccessPath, Add-PhysicalDisk, Add-StorageFaultDomain...} 清单 1.0.0.0 StorageBusCache {Clear-StorageBusDisk, Disable-StorageBusCache, Disable-StorageBusDisk,Enable-StorageBusCache...} Manifest 2.0.0.0 TLS {New-TlsSessionTicketKey, Enable-TlsSessionTicketKey, Disable-TlsSessionTicketKey, Export-TlsSessionTicketKey...} Manifest 1.0.0.0 TroubleshootingPack {Get-TroubleshootingPack, Invoke-TroubleshootingPack} Manifest 2.0.0.0 TrustedPlatformModule {Get-Tpm、Initialize-Tpm、Clear-Tpm、Unblock-Tpm...} 二进制 2.1.639.0 UEV {Clear-UevConfiguration、Clear-UevAppxPackage、Restore-UevBackup、Set-UevTemplateProfile...} 清单 2.0.0.0 VpnClient {Add-VpnConnection, Set-VpnConnection, Remove-VpnConnection, Get-VpnConnection...} Manifest 1.0.0.0 Wdac {Get-OdbcDriver, Set-OdbcDriver, Get-OdbcDsn, Add-OdbcDsn...} Manifest 2.0.0 .0 Whea {Get-WheaMemoryPolicy, Set-WheaMemoryPolicy} Manifest 1.0.0.0 WindowsDeveloperLicense {Get-WindowsDeveloperLicense, Unregister-WindowsDeveloperLicense, Show-WindowsDeveloperLicenseRegistration} 脚本 1.0 WindowsErrorReporting {Enable-WindowsErrorReporting, Disable-WindowsErrorReporting, Get-WindowsErrorReporting} Manifest 1.0.0.0WindowsSearch {Get-WindowsSearchSetting, Set-WindowsSearchSetting} Manifest 1.0.0.0 WindowsUpdate Get-WindowsUpdateLog Manifest 1.0.0.2 WindowsUpdateProvider {Get-WUAVersion, Get-WULastInstallationDate, Get-WULastScanSuccessDate, Get-WUIsPendingReboot...}0 WindowsDeveloperLicense {Get-WindowsDeveloperLicense, Unregister-WindowsDeveloperLicense, Show-WindowsDeveloperLicenseRegistration} 脚本 1.0 WindowsErrorReporting {Enable-WindowsErrorReporting, Disable-WindowsErrorReporting, Get-WindowsErrorReporting} Manifest 1.0.0.0 WindowsSearch {Get-WindowsSearchSetting, Set-WindowsSearchSetting} Manifest 1.0.0.0 WindowsUpdate Get-WindowsUpdateLog Manifest 1.0.0.2 WindowsUpdateProvider {Get-WUAVersion、Get-WULastInstallationDate、Get-WULastScanSuccessDate、Get-WUIsPendingReboot...}0 WindowsDeveloperLicense {Get-WindowsDeveloperLicense, Unregister-WindowsDeveloperLicense, Show-WindowsDeveloperLicenseRegistration} 脚本 1.0 WindowsErrorReporting {Enable-WindowsErrorReporting, Disable-WindowsErrorReporting, Get-WindowsErrorReporting} Manifest 1.0.0.0 WindowsSearch {Get-WindowsSearchSetting, Set-WindowsSearchSetting} Manifest 1.0.0.0 WindowsUpdate Get-WindowsUpdateLog Manifest 1.0.0.2 WindowsUpdateProvider {Get-WUAVersion、Get-WULastInstallationDate、Get-WULastScanSuccessDate、Get-WUIsPendingReboot...}Disable-WindowsErrorReporting, Get-WindowsErrorReporting} Manifest 1.0.0.0 WindowsSearch {Get-WindowsSearchSetting, Set-WindowsSearchSetting} Manifest 1.0.0.0 WindowsUpdate Get-WindowsUpdateLog Manifest 1.0.0.2 WindowsUpdateProvider {Get-WUAVersion, Get-WULastInstallationDate, Get-WULastScanSuccessDate, Get- WUIsPendingReboot...}Disable-WindowsErrorReporting, Get-WindowsErrorReporting} Manifest 1.0.0.0 WindowsSearch {Get-WindowsSearchSetting, Set-WindowsSearchSetting} Manifest 1.0.0.0 WindowsUpdate Get-WindowsUpdateLog Manifest 1.0.0.2 WindowsUpdateProvider {Get-WUAVersion, Get-WULastInstallationDate, Get-WULastScanSuccessDate, Get- WUIsPendingReboot...}

  Directory: C:\Program Files (x86)\Microsoft Azure Information Protection\Powershell

ModuleType 版本名称 ExportedCommands


二进制 2.6.111.0 AzureInformationProtection {Clear-AIPAuthentication、Get-AIPFileStatus、New-AIPCustomPermissions、Export-AIPLogs...}

标签: azurepowershell

解决方案


根据错误, MetricNameSpaceMicrosoft.Sql/servers/databases不包含 metric SqlDbDtuUsageMetric。关于支持的指标,请使用以下命令获取

Connect-AzAccount

Get-AzMetricDefinition -MetricNamespace "Microsoft.Sql/servers/databases" -ResourceId "<the resource id of your spl database>"

有关更多详细信息,请参阅此处此处


推荐阅读