Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.25k stars 3.86k forks source link

New-AzConsumptionBudget : Operation returned an invalid status code 'BadRequest' #11642

Closed rahulnandan closed 3 years ago

rahulnandan commented 4 years ago

Description

I am getting BadRequest error while creating Budget from Azure powershell

Steps to reproduce

Execute below command, after Login into Azure account and select your desired subscription context.

New-AzConsumptionBudget -Amount 6000 -Name PSBudget -Category Cost -StartDate 2020-04-01 -EndDate 2020-04-30 -TimeGrain Monthly

Environment data

$PSVersionTable                                                                                                                                                        
Name                           Value
----                           -----
PSVersion                      5.1.18362.752
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.18362.752
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Module versions

Get-Module  -ListAvailable                                                                                                                                             

    Directory: C:\Users\M1058522\Documents\WindowsPowerShell\Modules

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     1.7.2      Az.Accounts                         {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAutosave...}
Script     1.1.1      Az.Advisor                          {Get-AzAdvisorRecommendation, Enable-AzAdvisorRecommendation, Disable-AzAdvisorRecommendation, Get-AzAdvisorConfiguration...}
Script     1.0.3      Az.Aks                              {Get-AzAks, New-AzAks, Remove-AzAks, Import-AzAksCredential...}
Script     1.1.2      Az.AnalysisServices                 {Resume-AzAnalysisServicesServer, Suspend-AzAnalysisServicesServer, Get-AzAnalysisServicesServer, Remove-AzAnalysisServicesServ...
Script     1.3.4      Az.ApiManagement                    {Add-AzApiManagementApiToProduct, Add-AzApiManagementProductToGroup, Add-AzApiManagementRegion, Add-AzApiManagementUserToGroup...}
Script     1.0.3      Az.ApplicationInsights              {Get-AzApplicationInsights, New-AzApplicationInsights, Remove-AzApplicationInsights, Set-AzApplicationInsightsPricingPlan...}
Script     1.3.6      Az.Automation                       {Get-AzAutomationHybridWorkerGroup, Remove-AzAutomationHybridWorkerGroup, Get-AzAutomationJobOutputRecord, Import-AzAutomationD...
Script     2.0.2      Az.Batch                            {Remove-AzBatchAccount, Get-AzBatchAccount, Get-AzBatchAccountKey, New-AzBatchAccount...}
Script     1.0.2      Az.Billing                          {Get-AzBillingInvoice, Get-AzBillingPeriod, Get-AzEnrollmentAccount, Get-AzConsumptionBudget...}
Script     1.4.2      Az.Cdn                              {Get-AzCdnProfile, Get-AzCdnProfileSsoUrl, New-AzCdnProfile, Remove-AzCdnProfile...}
Script     1.2.3      Az.CognitiveServices                {Get-AzCognitiveServicesAccount, Get-AzCognitiveServicesAccountKey, Get-AzCognitiveServicesAccountSku, Get-AzCognitiveServicesA...
Script     3.5.0      Az.Compute                          {Remove-AzAvailabilitySet, Get-AzAvailabilitySet, New-AzAvailabilitySet, Update-AzAvailabilitySet...}
Script     1.0.3      Az.ContainerInstance                {New-AzContainerGroup, Get-AzContainerGroup, Remove-AzContainerGroup, Get-AzContainerInstanceLog}
Script     1.1.1      Az.ContainerRegistry                {New-AzContainerRegistry, Get-AzContainerRegistry, Update-AzContainerRegistry, Remove-AzContainerRegistry...}
Script     1.1.0      Az.DataBoxEdge                      {Get-AzDataBoxEdgeJob, Get-AzDataBoxEdgeDevice, Invoke-AzDataBoxEdgeDevice, New-AzDataBoxEdgeDevice...}
Script     1.6.1      Az.DataFactory                      {Set-AzDataFactoryV2, Update-AzDataFactoryV2, Get-AzDataFactoryV2, Remove-AzDataFactoryV2...}
Script     1.0.2      Az.DataLakeAnalytics                {Get-AzDataLakeAnalyticsDataSource, New-AzDataLakeAnalyticsCatalogCredential, Remove-AzDataLakeAnalyticsCatalogCredential, Set-...
Script     1.2.6      Az.DataLakeStore                    {Get-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeStoreFirewallRule, Set-AzDataL...
Script     1.1.0      Az.DeploymentManager                {Get-AzDeploymentManagerArtifactSource, New-AzDeploymentManagerArtifactSource, Set-AzDeploymentManagerArtifactSource, Remove-Az...
Script     1.0.2      Az.DevTestLabs                      {Get-AzDtlAllowedVMSizesPolicy, Get-AzDtlAutoShutdownPolicy, Get-AzDtlAutoStartPolicy, Get-AzDtlVMsPerLabPolicy...}
Script     1.1.2      Az.Dns                              {Get-AzDnsRecordSet, New-AzDnsRecordConfig, Remove-AzDnsRecordSet, Set-AzDnsRecordSet...}
Script     1.2.3      Az.EventGrid                        {New-AzEventGridTopic, Get-AzEventGridTopic, Set-AzEventGridTopic, New-AzEventGridTopicKey...}
Script     1.4.3      Az.EventHub                         {New-AzEventHubNamespace, Get-AzEventHubNamespace, Set-AzEventHubNamespace, Remove-AzEventHubNamespace...}
Script     1.4.0      Az.FrontDoor                        {New-AzFrontDoor, Get-AzFrontDoor, Set-AzFrontDoor, Remove-AzFrontDoor...}
Script     3.0.3      Az.HDInsight                        {Get-AzHDInsightJob, New-AzHDInsightSqoopJobDefinition, Wait-AzHDInsightJob, New-AzHDInsightStreamingMapReduceJobDefinition...}
Script     1.0.1      Az.HealthcareApis                   {New-AzHealthcareApisService, Remove-AzHealthcareApisService, Set-AzHealthcareApisService, Get-AzHealthcareApisService}
Script     2.1.0      Az.IotHub                           {Add-AzIotHubKey, Get-AzIotHubEventHubConsumerGroup, Get-AzIotHubConnectionString, Get-AzIotHubJob...}
Script     1.5.1      Az.KeyVault                         {Add-AzKeyVaultCertificate, Update-AzKeyVaultCertificate, Stop-AzKeyVaultCertificateOperation, Get-AzKeyVaultCertificateOperati...
Script     1.3.2      Az.LogicApp                         {Get-AzIntegrationAccountAgreement, Get-AzIntegrationAccountAssembly, Get-AzIntegrationAccountBatchConfiguration, Get-AzIntegra...
Script     1.1.3      Az.MachineLearning                  {Move-AzMlCommitmentAssociation, Get-AzMlCommitmentAssociation, Get-AzMlCommitmentPlanUsageHistory, Remove-AzMlCommitmentPlan...}
Script     1.0.2      Az.ManagedServices                  {Get-AzManagedServicesAssignment, New-AzManagedServicesAssignment, Remove-AzManagedServicesAssignment, Get-AzManagedServicesDef...
Script     1.0.2      Az.MarketplaceOrdering              {Get-AzMarketplaceTerms, Set-AzMarketplaceTerms}
Script     1.1.1      Az.Media                            {Sync-AzMediaServiceStorageKey, Set-AzMediaServiceKey, Get-AzMediaServiceKey, Get-AzMediaServiceNameAvailability...}
Script     1.6.0      Az.Monitor                          {Get-AzMetricDefinition, Get-AzMetric, Remove-AzLogProfile, Get-AzLogProfile...}
Script     2.3.1      Az.Network                          {Add-AzApplicationGatewayAuthenticationCertificate, Get-AzApplicationGatewayAuthenticationCertificate, New-AzApplicationGateway...
Script     1.1.1      Az.NotificationHubs                 {Get-AzNotificationHub, Get-AzNotificationHubAuthorizationRule, Get-AzNotificationHubListKey, Get-AzNotificationHubPNSCredentia...
Script     1.3.4      Az.OperationalInsights              {New-AzOperationalInsightsAzureActivityLogDataSource, New-AzOperationalInsightsCustomLogDataSource, Disable-AzOperationalInsigh...
Script     1.2.0      Az.PolicyInsights                   {Get-AzPolicyEvent, Get-AzPolicyState, Get-AzPolicyStateSummary, Get-AzPolicyRemediation...}
Script     1.1.1      Az.PowerBIEmbedded                  {Remove-AzPowerBIWorkspaceCollection, Get-AzPowerBIWorkspaceCollection, Get-AzPowerBIWorkspaceCollectionAccessKey, Get-AzPowerB...
Script     1.0.2      Az.PrivateDns                       {Get-AzPrivateDnsZone, Remove-AzPrivateDnsZone, Set-AzPrivateDnsZone, New-AzPrivateDnsZone...}
Script     2.7.0      Az.RecoveryServices                 {Get-AzRecoveryServicesBackupProperty, Get-AzRecoveryServicesVault, Get-AzRecoveryServicesVaultSettingsFile, New-AzRecoveryServ...
Script     1.2.1      Az.RedisCache                       {Remove-AzRedisCachePatchSchedule, New-AzRedisCacheScheduleEntry, Get-AzRedisCachePatchSchedule, New-AzRedisCachePatchSchedule...}
Script     1.0.3      Az.Relay                            {New-AzRelayNamespace, Get-AzRelayNamespace, Set-AzRelayNamespace, Remove-AzRelayNamespace...}
Script     1.11.0     Az.Resources                        {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzRoleAssignment, New-AzRoleAssignment...}
Script     1.4.1      Az.ServiceBus                       {New-AzServiceBusNamespace, Get-AzServiceBusNamespace, Set-AzServiceBusNamespace, Remove-AzServiceBusNamespace...}
Script     2.0.1      Az.ServiceFabric                    {Add-AzServiceFabricClientCertificate, Add-AzServiceFabricClusterCertificate, Add-AzServiceFabricNode, Add-AzServiceFabricNodeT...
Script     1.1.1      Az.SignalR                          {New-AzSignalR, Get-AzSignalR, Get-AzSignalRKey, New-AzSignalRKey...}
Script     2.3.0      Az.Sql                              {Get-AzSqlDatabaseTransparentDataEncryption, Get-AzSqlDatabaseTransparentDataEncryptionActivity, Set-AzSqlDatabaseTransparentDa...
Script     1.1.0      Az.SqlVirtualMachine                {New-AzSqlVM, Get-AzSqlVM, Update-AzSqlVM, Remove-AzSqlVM...}
Script     1.12.0     Az.Storage                          {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStorageAccount, New-AzStorageAccountKey...}
Script     1.2.3      Az.StorageSync                      {Invoke-AzStorageSyncCompatibilityCheck, New-AzStorageSyncService, Get-AzStorageSyncService, Remove-AzStorageSyncService...}
Script     1.0.1      Az.StreamAnalytics                  {Get-AzStreamAnalyticsFunction, Get-AzStreamAnalyticsDefaultFunctionDefinition, New-AzStreamAnalyticsFunction, Remove-AzStreamA...
Script     1.0.3      Az.TrafficManager                   {Add-AzTrafficManagerCustomHeaderToEndpoint, Remove-AzTrafficManagerCustomHeaderFromEndpoint, Add-AzTrafficManagerCustomHeaderT...
Script     1.6.0      Az.Websites                         {Get-AzAppServicePlan, Set-AzAppServicePlan, New-AzAppServicePlan, Remove-AzAppServicePlan...}

    Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     1.7.5      Az.Accounts                         {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAutosave...}
Script     1.4.0      Az.ApiManagement                    {Add-AzApiManagementApiToProduct, Add-AzApiManagementProductToGroup, Add-AzApiManagementRegion, Add-AzApiManagementUserToGroup...}
Script     3.6.0      Az.Compute                          {Remove-AzAvailabilitySet, Get-AzAvailabilitySet, New-AzAvailabilitySet, Update-AzAvailabilitySet...}
Script     1.7.0      Az.DataFactory                      {Set-AzDataFactoryV2, Update-AzDataFactoryV2, Get-AzDataFactoryV2, Remove-AzDataFactoryV2...}
Script     1.2.8      Az.DataLakeStore                    {Get-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeStoreFirewallRule, Set-AzDataL...
Script     3.1.0      Az.HDInsight                        {Get-AzHDInsightJob, New-AzHDInsightSqoopJobDefinition, Wait-AzHDInsightJob, New-AzHDInsightStreamingMapReduceJobDefinition...}
Script     2.3.0      Az.IotHub                           {Add-AzIotHubKey, Get-AzIotHubEventHubConsumerGroup, Get-AzIotHubConnectionString, Get-AzIotHubJob...}
Script     1.5.2      Az.KeyVault                         {Add-AzKeyVaultCertificate, Update-AzKeyVaultCertificate, Stop-AzKeyVaultCertificateOperation, Get-AzKeyVaultCertificateOperati...
Script     1.6.2      Az.Monitor                          {Get-AzMetricDefinition, Get-AzMetric, Remove-AzLogProfile, Get-AzLogProfile...}
Script     2.4.0      Az.Network                          {Add-AzApplicationGatewayAuthenticationCertificate, Get-AzApplicationGatewayAuthenticationCertificate, New-AzApplicationGateway...
Script     1.2.1      Az.PolicyInsights                   {Get-AzPolicyEvent, Get-AzPolicyState, Get-AzPolicyStateSummary, Get-AzPolicyRemediation...}
Script     2.8.0      Az.RecoveryServices                 {Get-AzRecoveryServicesBackupProperty, Get-AzRecoveryServicesVault, Get-AzRecoveryServicesVaultSettingsFile, New-AzRecoveryServ...
Script     1.13.0     Az.Resources                        {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzRoleAssignment, New-AzRoleAssignment...}
Script     2.5.0      Az.Sql                              {Get-AzSqlDatabaseTransparentDataEncryption, Get-AzSqlDatabaseTransparentDataEncryptionActivity, Set-AzSqlDatabaseTransparentDa...
Script     1.13.0     Az.Storage                          {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStorageAccount, New-AzStorageAccountKey...}
Script     1.0.0      Az.Support                          {Get-AzSupportService, Get-AzSupportProblemClassification, Get-AzSupportTicket, Get-AzSupportTicketCommunication...}
Script     1.8.0      Az.Websites                         {Get-AzAppServicePlan, Set-AzAppServicePlan, New-AzAppServicePlan, Remove-AzAppServicePlan...}
Script     1.0.1      Microsoft.PowerShell.Operation.V... {Get-OperationValidation, Invoke-OperationValidation}
Binary     1.0.0.1    PackageManagement                   {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Script     3.4.0      Pester                              {Describe, Context, It, Should...}
Script     1.0.0.1    PowerShellGet                       {Install-Module, Find-Module, Save-Module, Update-Module...}
Script     2.0.0      PSReadline                          {Get-PSReadLineKeyHandler, Set-PSReadLineKeyHandler, Remove-PSReadLineKeyHandler, Get-PSReadLineOption...}

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

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   1.0.0.0    AppBackgroundTask                   {Disable-AppBackgroundTaskDiagnosticLog, Enable-AppBackgroundTaskDiagnosticLog, Set-AppBackgroundTaskResourcePolicy, Unregister...
Manifest   2.0.0.0    AppLocker                           {Get-AppLockerFileInformation, Get-AppLockerPolicy, New-AppLockerPolicy, Set-AppLockerPolicy...}
Manifest   1.0.0.0    AppvClient                          {Add-AppvClientConnectionGroup, Add-AppvClientPackage, Add-AppvPublishingServer, Disable-Appv...}
Manifest   2.0.1.0    Appx                                {Add-AppxPackage, Get-AppxPackage, Get-AppxPackageManifest, Remove-AppxPackage...}
Script     1.0.0.0    AssignedAccess                      {Clear-AssignedAccess, Get-AssignedAccess, Set-AssignedAccess}
Manifest   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, Clear-BCCache, Disable-BC, Disable-BCDowngrading...}
Manifest   1.0.0.0    CimCmdlets                          {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance, Get-CimSession...}
Manifest   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-MpPreference, Remove-MpPreference...}
Manifest   1.0.2.0    DeliveryOptimization                {Delete-DeliveryOptimizationCache, Get-DeliveryOptimizationStatus, Set-DeliveryOptimizationStatus, Get-DeliveryOptimizationPerf...
Manifest   1.0.0.0    DirectAccessClientComponents        {Disable-DAManualEntryPointSelection, Enable-DAManualEntryPointSelection, Get-DAClientExperienceConfiguration, Get-DAEntryPoint...
Script     3.0        Dism                                {Add-AppxProvisionedPackage, Add-WindowsDriver, Add-WindowsCapability, Add-WindowsImage...}
Manifest   1.0.0.0    DnsClient                           {Resolve-DnsName, Clear-DnsClientCache, Get-DnsClient, Get-DnsClientCache...}
Manifest   1.0.0.0    EventTracingManagement              {Start-EtwTraceSession, New-EtwTraceSession, Get-EtwTraceSession, Update-EtwTraceSession...}
Manifest   1.0.0.0    HgsClient                           {Get-HgsAttestationBaselinePolicy, Get-HgsClientConfiguration, Test-HgsClientConfiguration, Set-HgsClientConfiguration...}
Manifest   1.0.0.0    HgsDiagnostics                      {New-HgsTraceTarget, Get-HgsTrace, Get-HgsTraceFileData, Test-HgsTraceTarget}
Binary     1.0.0.0    HostComputeService                  {Get-ComputeProcess, Stop-ComputeProcess}
Manifest   1.0.0.1    HostNetworkingService               {Remove-HnsNamespace, Remove-HnsEndpoint, Get-HnsEndpoint, Remove-HnsPolicyList...}
Binary     2.0.0.0    Hyper-V                             {Add-VMAssignableDevice, Add-VMDvdDrive, Add-VMFibreChannelHba, Add-VMGpuPartitionAdapter...}
Binary     1.1        Hyper-V                             {Add-VMDvdDrive, Add-VMFibreChannelHba, Add-VMHardDiskDrive, Add-VMMigrationNetwork...}
Manifest   2.0.0.0    International                       {Get-WinDefaultInputMethodOverride, Set-WinDefaultInputMethodOverride, Get-WinHomeLocation, Set-WinHomeLocation...}
Manifest   1.0.0.0    iSCSI                               {Get-IscsiTargetPortal, New-IscsiTargetPortal, Remove-IscsiTargetPortal, Update-IscsiTargetPortal...}
Script     1.0.0.0    ISE                                 {New-IseSnippet, Import-IseSnippet, Get-IseSnippet}
Manifest   1.0.0.0    Kds                                 {Add-KdsRootKey, Get-KdsRootKey, Test-KdsRootKey, Set-KdsConfiguration...}
Manifest   1.0.1.0    Microsoft.PowerShell.Archive        {Compress-Archive, Expand-Archive}
Manifest   3.0.0.0    Microsoft.PowerShell.Diagnostics    {Get-WinEvent, Get-Counter, Import-Counter, Export-Counter...}
Manifest   3.0.0.0    Microsoft.PowerShell.Host           {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...}
Script     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...}
Manifest   1.0        MMAgent                             {Disable-MMAgent, Enable-MMAgent, Set-MMAgent, Get-MMAgent...}
Manifest   1.0.0.0    MsDtc                               {New-DtcDiagnosticTransaction, Complete-DtcDiagnosticTransaction, Join-DtcDiagnosticResourceManager, Receive-DtcDiagnosticTrans...
Manifest   2.0.0.0    NetAdapter                          {Disable-NetAdapter, Disable-NetAdapterBinding, Disable-NetAdapterChecksumOffload, Disable-NetAdapterEncapsulatedPacketTaskOffl...
Manifest   1.0.0.0    NetConnection                       {Get-NetConnectionProfile, Set-NetConnectionProfile}
Manifest   1.0.0.0    NetEventPacketCapture               {New-NetEventSession, Remove-NetEventSession, Get-NetEventSession, Set-NetEventSession...}
Manifest   2.0.0.0    NetLbfo                             {Add-NetLbfoTeamMember, Add-NetLbfoTeamNic, Get-NetLbfoTeam, Get-NetLbfoTeamMember...}
Manifest   1.0.0.0    NetNat                              {Get-NetNat, Get-NetNatExternalAddress, Get-NetNatStaticMapping, Get-NetNatSession...}
Manifest   2.0.0.0    NetQos                              {Get-NetQosPolicy, Set-NetQosPolicy, Remove-NetQosPolicy, New-NetQosPolicy}
Manifest   2.0.0.0    NetSecurity                         {Get-DAPolicyChange, New-NetIPsecAuthProposal, New-NetIPsecMainModeCryptoProposal, New-NetIPsecQuickModeCryptoProposal...}
Manifest   1.0.0.0    NetSwitchTeam                       {New-NetSwitchTeam, Remove-NetSwitchTeam, Get-NetSwitchTeam, Rename-NetSwitchTeam...}
Manifest   1.0.0.0    NetTCPIP                            {Get-NetIPAddress, Get-NetIPInterface, Get-NetIPv4Protocol, Get-NetIPv6Protocol...}
Manifest   1.0.0.0    NetworkConnectivityStatus           {Get-DAConnectionStatus, Get-NCSIPolicyConfiguration, Reset-NCSIPolicyConfiguration, Set-NCSIPolicyConfiguration}
Manifest   1.0.0.0    NetworkSwitchManager                {Disable-NetworkSwitchEthernetPort, Enable-NetworkSwitchEthernetPort, Get-NetworkSwitchEthernetPort, Remove-NetworkSwitchEthern...
Manifest   1.0.0.0    NetworkTransition                   {Add-NetIPHttpsCertBinding, Disable-NetDnsTransitionConfiguration, Disable-NetIPHttpsProfile, Disable-NetNatTransitionConfigura...
Manifest   1.0.0.0    PcsvDevice                          {Get-PcsvDevice, Start-PcsvDevice, Stop-PcsvDevice, Restart-PcsvDevice...}
Binary     1.0.0.0    PersistentMemory                    {Get-PmemDisk, Get-PmemPhysicalDevice, Get-PmemUnusedRegion, New-PmemDisk...}
Manifest   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-Printer, Add-PrinterDriver, Add-PrinterPort, Get-PrintConfiguration...}
Binary     1.0.11     ProcessMitigations                  {Get-ProcessMitigation, Set-ProcessMitigation, ConvertTo-ProcessMitigationPolicy}
Script     3.0        Provisioning                        {Install-ProvisioningPackage, Export-ProvisioningPackage, Install-TrustedProvisioningCertificate, Export-Trace...}
Manifest   1.1        PSDesiredStateConfiguration         {Set-DscLocalConfigurationManager, Start-DscConfiguration, Test-DscConfiguration, Publish-DscConfiguration...}
Script     1.0.0.0    PSDiagnostics                       {Disable-PSTrace, Disable-PSWSManCombinedTrace, Disable-WSManTrace, Enable-PSTrace...}
Binary     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...}
Manifest   2.0.0.0    SecureBoot                          {Confirm-SecureBootUEFI, Set-SecureBootUEFI, Get-SecureBootUEFI, Format-SecureBootUEFI...}
Manifest   2.0.0.0    SmbShare                            {Get-SmbShare, Remove-SmbShare, Set-SmbShare, Block-SmbShareAccess...}
Manifest   2.0.0.0    SmbWitness                          {Get-SmbWitnessClient, Move-SmbWitnessClient, gsmbw, msmbw...}
Manifest   1.0.0.0    StartLayout                         {Export-StartLayout, Import-StartLayout, Export-StartLayoutEdgeAssets, Get-StartApps}
Manifest   2.0.0.0    Storage                             {Add-InitiatorIdToMaskingSet, Add-PartitionAccessPath, Add-PhysicalDisk, Add-StorageFaultDomain...}
Manifest   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...}
Binary     2.1.639.0  UEV                                 {Clear-UevConfiguration, Clear-UevAppxPackage, Restore-UevBackup, Set-UevTemplateProfile...}
Manifest   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}
Script     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...}

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

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Binary     1.10.56.0  AzureInformationProtection          {Clear-RMSAuthentication, Get-AIPFileStatus, Get-RMSFileStatus, Get-RMSServer...}

Debug output

 New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost' -StartDate '2020-04-01' -EndDate '2020-05-31' -TimeGrain Monthly                                DEBUG: 7:20:54 PM - NewAzureRmConsumptionBudget begin processing with ParameterSet 'Subscription'.
DEBUG: 7:20:54 PM - using account id 'rahul.nandan2020@outlook.com'...
DEBUG: [Common.Authentication]: Authenticating using Account: 'rahul.nandan2020@outlook.com', environment: 'AzureCloud', tenant: '02364136-a9d4-4319-9235-74b857c7753a'
DEBUG: [Common.Authentication]: Authenticating using configuration values: Domain: '02364136-a9d4-4319-9235-74b857c7753a', Endpoint: 'https://login.microsoftonline.com/', ClientId:
'1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirect: 'urn:ietf:wg:oauth:2.0:oob', ResourceClientUri: 'https://management.core.windows.net/', ValidateAuthority: 'True'
DEBUG: [Common.Authentication]: Acquiring token using context with Authority 'https://login.microsoftonline.com/02364136-a9d4-4319-9235-74b857c7753a/', CorrelationId:
'00000000-0000-0000-0000-000000000000', ValidateAuthority: 'True'
DEBUG: [Common.Authentication]: Acquiring token using AdalConfiguration with Domain: '02364136-a9d4-4319-9235-74b857c7753a', AdEndpoint: 'https://login.microsoftonline.com/', ClientId:
'1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirectUri: urn:ietf:wg:oauth:2.0:oob
DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0931333Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: ADAL PCL.Desktop with assembly version '3.19.2.6005', file version
'3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...
DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0931333Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: ADAL PCL.Desktop with assembly version '3.19.2.6005', file version
'3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...
DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0931333Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: === Token Acquisition started:
 CacheType: null
 Authentication Target: User
 , Authority Host: login.microsoftonline.com
DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0931333Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: === Token Acquisition started:
 Authority: https://login.microsoftonline.com/02364136-a9d4-4319-9235-74b857c7753a/
 Resource: https://management.core.windows.net/
 ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
 CacheType: null
 Authentication Target: User

DEBUG: [ADAL]: Verbose: 2020-04-20T13:50:54.0931333Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: Loading from cache.
DEBUG: [ADAL]: Verbose: 2020-04-20T13:50:54.0931333Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: Loading from cache.
DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0931333Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs: Deserialized 2 items to token cache.
DEBUG: [ADAL]: Verbose: 2020-04-20T13:50:54.0941351Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: Looking up cache for a token...
DEBUG: [ADAL]: Verbose: 2020-04-20T13:50:54.0941351Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: Looking up cache for a token...
DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0941351Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: An item matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0941351Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: An item matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0941351Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: 10.8418477483333 minutes left until token in cache expires
DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0941351Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: 10.8418477483333 minutes left until token in cache expires
DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0941351Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: A matching item (access token or refresh token or both) was found in the
cache
DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0941351Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: A matching item (access token or refresh token or both) was found in the
cache
DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0941351Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned:
Expiration Time: 4/20/2020 2:01:44 PM +00:00
DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0941351Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned:
Expiration Time: 4/20/2020 2:01:44 PM +00:00Access Token Hash: L0oblb112ZINKGKWaeFR7M3E4p6ZIk2PCLGfLHsmHY0=
  User id: fee281af-ee28-47b8-8313-3f47a963c6e7
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '04/20/2020 14:01:44 +00:00', MultipleResource? 'True', Tenant: '02364136-a9d4-4319-9235-74b857c7753a', UserId:
'rahul.nandan2020@outlook.com'
DEBUG: [Common.Authentication]: User info for token DisplayId: 'rahul.nandan2020@outlook.com', Name: Rahul Nandan, IdProvider: 'live.com', Uid: 'fee281af-ee28-47b8-8313-3f47a963c6e7'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '04/20/2020 14:01:44 +00:00' Comparing to '04/20/2020 13:50:54 +00:00' With threshold '00:05:00', calculated time
until token expiry: '00:10:50.4985853'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
PUT

Absolute Uri:
https://management.azure.com/subscriptions/da3ee1f7-9a76-4e64-8f36-b815da57a35f/providers/Microsoft.Consumption/budgets/PSBudget?api-version=2018-01-31

Headers:
x-ms-client-request-id        : ec25672a-5120-4c8c-a287-2d5374f5d55f
accept-language               : en-US

Body:
{
  "properties": {
    "category": "Cost",
    "amount": 6000.0,
    "timeGrain": "Monthly",
    "timePeriod": {
      "startDate": "2020-04-01T00:00:00Z",
      "endDate": "2020-05-31T00:00:00Z"
    },
    "filters": {},
    "notifications": {}
  }
}

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
BadRequest

Headers:
Pragma                        : no-cache
session-id                    : 6b46a690-f8dc-4f91-abb4-3c8e979bd045
x-ms-request-id               : 7bd02b44-0734-4b68-9a67-c731279ed42c
x-ms-correlation-request-id   : cefbe690-5a4b-49e6-9a9f-69e320d03663
x-ms-client-request-id        : 3073ffa6-80ed-450f-aa63-5f0bf59f97b2
Access-Control-Allow-Origin   : *
X-Content-Type-Options        : nosniff
Strict-Transport-Security     : max-age=31536000; includeSubDomains
x-ms-ratelimit-remaining-subscription-writes: 1199
x-ms-routing-request-id       : WESTINDIA:20200420T135109Z:cefbe690-5a4b-49e6-9a9f-69e320d03663
Cache-Control                 : no-cache
Date                          : Mon, 20 Apr 2020 13:51:08 GMT

Body:
{
  "error": {
    "code": "400",
    "message": "Subscription da3ee1f7-9a76-4e64-8f36-b815da57a35f is not associated with EA offer type (Request ID: 7bd02b44-0734-4b68-9a67-c731279ed42c)"
  }
}

New-AzConsumptionBudget : Operation returned an invalid status code 'BadRequest'
At line:1 char:1
+ New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [New-AzConsumptionBudget], ErrorResponseException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget

DEBUG: AzureQoSEvent: CommandName - New-AzConsumptionBudget; IsSuccess - False; Duration - 00:00:02.2973388;; Exception -
Microsoft.Azure.Management.Consumption.Models.ErrorResponseException: Operation returned an invalid status code 'BadRequest'
   at Microsoft.Azure.Management.Consumption.BudgetsOperations.<CreateOrUpdateWithHttpMessagesAsync>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.<CreateOrUpdateAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters)
   at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet();
DEBUG: Finish sending metric.
DEBUG: 7:20:57 PM - NewAzureRmConsumptionBudget end processing.

Error output

 Resolve-AzError                                                                                                                                                        DEBUG: 7:21:44 PM - ResolveError begin processing with ParameterSet 'AnyErrorParameterSet'.
DEBUG: 7:21:44 PM - using account id 'rahul.nandan2020@outlook.com'...
WARNING: Breaking changes in the cmdlet 'Resolve-AzError' :
WARNING:  - The `Resolve-Error` alias will be removed in a future release.  Please change any scripts that use this alias to use `Resolve-AzError` instead.

WARNING: NOTE : Go to https://aka.ms/azps-changewarnings for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell.

   HistoryId: 42

Message        : Operation returned an invalid status code 'BadRequest'
StackTrace     :    at Microsoft.Azure.Management.Consumption.BudgetsOperations.<CreateOrUpdateWithHttpMessagesAsync>d__8.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.<CreateOrUpdateAsync>d__7.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters)
                    at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet()
Exception      : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException
InvocationInfo : {New-AzConsumptionBudget}
Line           : New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost' -StartDate '2020-04-01' -EndDate '2020-05-31' -TimeGrain Monthly
Position       : At line:1 char:1
                 + New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 42

   HistoryId: 37

Message        : Operation returned an invalid status code 'BadRequest'
StackTrace     :    at Microsoft.Azure.Management.Consumption.BudgetsOperations.<CreateOrUpdateWithHttpMessagesAsync>d__8.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.<CreateOrUpdateAsync>d__7.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters)
                    at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet()
Exception      : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException
InvocationInfo : {New-AzConsumptionBudget}
Line           : New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost' -StartDate '2020-04-01' -EndDate '2020-05-31' -TimeGrain Monthly
Position       : At line:1 char:1
                 + New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 37

   HistoryId: 35

Message        : Operation returned an invalid status code 'BadRequest'
StackTrace     :    at Microsoft.Azure.Management.Consumption.BudgetsOperations.<CreateOrUpdateWithHttpMessagesAsync>d__8.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.<CreateOrUpdateAsync>d__7.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters)
                    at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet()
Exception      : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException
InvocationInfo : {New-AzConsumptionBudget}
Line           : New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost' -StartDate '2020-04-01' -EndDate '2020-05-31' -TimeGrain Monthly
Position       : At line:1 char:1
                 + New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 35

   HistoryId: 33

Message        : Operation returned an invalid status code 'BadRequest'
StackTrace     :    at Microsoft.Azure.Management.Consumption.BudgetsOperations.<CreateOrUpdateWithHttpMessagesAsync>d__8.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.<CreateOrUpdateAsync>d__7.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters)
                    at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet()
Exception      : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException
InvocationInfo : {New-AzConsumptionBudget}
Line           : New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost' -StartDate '2020-04-01' -EndDate '2020-05-31' -TimeGrain Monthly
Position       : At line:1 char:1
                 + New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 33

   HistoryId: 31

Message        : Operation returned an invalid status code 'BadRequest'
StackTrace     :    at Microsoft.Azure.Management.Consumption.BudgetsOperations.<CreateOrUpdateWithHttpMessagesAsync>d__8.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.<CreateOrUpdateAsync>d__7.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters)
                    at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet()
Exception      : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException
InvocationInfo : {New-AzConsumptionBudget}
Line           : New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost' -StartDate '2020-04-01' -EndDate '2020-05-31' -TimeGrain Monthly
Position       : At line:1 char:1
                 + New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 31

   HistoryId: 27

Message        : Parameter set cannot be resolved using the specified named parameters.
StackTrace     :    at System.Management.Automation.CmdletParameterBinderController.ThrowAmbiguousParameterSetException(UInt32 parameterSetFlags, MergedCommandParameterMetadata
                 bindableParameters)
                    at System.Management.Automation.CmdletParameterBinderController.ValidateParameterSets(Boolean prePipelineInput, Boolean setDefault)
                    at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments)
                    at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)
                    at System.Management.Automation.CommandProcessor.BindCommandLineParameters()
                    at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues)
                    at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues)
                    at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)
                    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
                    at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[]
                 pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
                    at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.ParameterBindingException
InvocationInfo : {Set-PSDebug}
Line           : Set-PSDebug
Position       : At line:1 char:1
                 + Set-PSDebug
                 + ~~~~~~~~~~~
HistoryId      : 27

Message        : Unable to find repository 'Name'. Use Get-PSRepository to see all available repositories.
StackTrace     :
Exception      : System.Exception
InvocationInfo : {Get-PackageSource}
Line           :                 $packageSources = PackageManagement\Get-PackageSource @PSBoundParameters

Position       : At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:4489 char:35
                 + ... ckageSources = PackageManagement\Get-PackageSource @PSBoundParameters
                 +                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 27

   HistoryId: 26

Message        : Operation returned an invalid status code 'BadRequest'
StackTrace     :    at Microsoft.Azure.Management.Consumption.BudgetsOperations.<CreateOrUpdateWithHttpMessagesAsync>d__8.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.<CreateOrUpdateAsync>d__7.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters)
                    at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet()
Exception      : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException
InvocationInfo : {New-AzConsumptionBudget}
Line           : New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost' -StartDate '2020-04-01' -EndDate '2020-05-31' -TimeGrain Monthly
Position       : At line:1 char:1
                 + New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 26

   HistoryId: 25

Message        : Operation returned an invalid status code 'BadRequest'
StackTrace     :    at Microsoft.Azure.Management.Consumption.BudgetsOperations.<CreateOrUpdateWithHttpMessagesAsync>d__8.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.<CreateOrUpdateAsync>d__7.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters)
                    at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet()
Exception      : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException
InvocationInfo : {New-AzConsumptionBudget}
Line           : New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost' -StartDate '2020-04-01' -EndDate '2020-05-31' -TimeGrain Monthly -ContactEmail
                 'rahul.nandan2020@outlook.com'
Position       : At line:1 char:1
                 + New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 25

   HistoryId: 22

Message        : Operation returned an invalid status code 'BadRequest'
StackTrace     :    at Microsoft.Azure.Management.Consumption.BudgetsOperations.<CreateOrUpdateWithHttpMessagesAsync>d__8.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.<CreateOrUpdateAsync>d__7.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters)
                    at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet()
Exception      : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException
InvocationInfo : {New-AzConsumptionBudget}
Line           : New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost' -StartDate '2020-04-01' -EndDate '2020-05-31' -TimeGrain Monthly -ContactEmail
                 'rahul.nandan2020@outlook.com'
Position       : At line:1 char:1
                 + New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 22

   HistoryId: 21

Message        : Operation returned an invalid status code 'BadRequest'
StackTrace     :    at Microsoft.Azure.Management.Consumption.BudgetsOperations.<CreateOrUpdateWithHttpMessagesAsync>d__8.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.<CreateOrUpdateAsync>d__7.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters)
                    at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet()
Exception      : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException
InvocationInfo : {New-AzConsumptionBudget}
Line           : New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost' -StartDate '2020-04-01' -EndDate '2020-05-31' -TimeGrain Monthly
Position       : At line:1 char:1
                 + New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 21

   HistoryId: 19

Message        : Operation returned an invalid status code 'BadRequest'
StackTrace     :    at Microsoft.Azure.Management.Consumption.BudgetsOperations.<CreateOrUpdateWithHttpMessagesAsync>d__8.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.<CreateOrUpdateAsync>d__7.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters)
                    at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet()
Exception      : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException
InvocationInfo : {New-AzConsumptionBudget}
Line           : New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost' -StartDate 2020-04-01 -EndDate 2020-04-30 -TimeGrain Monthly
Position       : At line:1 char:1
                 + New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 19

   HistoryId: 18

Message        : Operation returned an invalid status code 'BadRequest'
StackTrace     :    at Microsoft.Azure.Management.Consumption.BudgetsOperations.<CreateOrUpdateWithHttpMessagesAsync>d__8.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.<CreateOrUpdateAsync>d__7.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters)
                    at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet()
Exception      : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException
InvocationInfo : {New-AzConsumptionBudget}
Line           : New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category Cost -StartDate 2020-04-01 -EndDate 2020-04-30 -TimeGrain Monthly
Position       : At line:1 char:1
                 + New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category Cost  ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 18

   HistoryId: 14

Message        : Operation returned an invalid status code 'BadRequest'
StackTrace     :    at Microsoft.Azure.Management.Consumption.BudgetsOperations.<CreateOrUpdateWithHttpMessagesAsync>d__8.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.<CreateOrUpdateAsync>d__7.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters)
                    at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet()
Exception      : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException
InvocationInfo : {New-AzConsumptionBudget}
Line           : New-AzConsumptionBudget -Amount 6000 -Name PSBudget -Category Cost -StartDate 2020-04-01 -EndDate 2020-04-30 -TimeGrain Monthly
Position       : At line:1 char:1
                 + New-AzConsumptionBudget -Amount 6000 -Name PSBudget -Category Cost -S ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 14

   HistoryId: 10

Message        : Operation returned an invalid status code 'BadRequest'
StackTrace     :    at Microsoft.Azure.Management.Consumption.BudgetsOperations.<CreateOrUpdateWithHttpMessagesAsync>d__8.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.<CreateOrUpdateAsync>d__7.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters)
                    at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet()
Exception      : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException
InvocationInfo : {New-AzConsumptionBudget}
Line           : New-AzConsumptionBudget -Amount 6000 -Name PSBudget -Category Cost -StartDate 2020-04-01 -EndDate 2020-04-30 -TimeGrain Monthly
Position       : At line:1 char:1
                 + New-AzConsumptionBudget -Amount 6000 -Name PSBudget -Category Cost -S ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 10

   HistoryId: 6

Message        : Operation returned an invalid status code 'BadRequest'
StackTrace     :    at Microsoft.Azure.Management.Consumption.BudgetsOperations.<CreateOrUpdateWithHttpMessagesAsync>d__8.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.<CreateOrUpdateAsync>d__7.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters)
                    at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet()
Exception      : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException
InvocationInfo : {New-AzConsumptionBudget}
Line           : New-AzConsumptionBudget -Amount 6000 -Name PSBudget -Category Cost -StartDate 2020-04-01 -EndDate 2020-04-30 -TimeGrain Monthly
Position       : At line:1 char:1
                 + New-AzConsumptionBudget -Amount 6000 -Name PSBudget -Category Cost -S ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 6

   HistoryId: 5

Message        : Operation returned an invalid status code 'BadRequest'
StackTrace     :    at Microsoft.Azure.Management.Consumption.BudgetsOperations.<CreateOrUpdateByResourceGroupNameWithHttpMessagesAsync>d__11.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.<CreateOrUpdateByResourceGroupNameAsync>d__13.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdateByResourceGroupName(IBudgetsOperations operations, String resourceGroupName, String
                 budgetName, Budget parameters)
                    at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet()
Exception      : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException
InvocationInfo : {New-AzConsumptionBudget}
Line           : New-AzConsumptionBudget -Amount 6000 -ResourceGroupName testrg -Name PSBudget -Category Cost -StartDate 2020-04-01 -EndDate 2020-11-01 -TimeGrain Monthly
Position       : At line:1 char:1
                 + New-AzConsumptionBudget -Amount 6000 -ResourceGroupName testrg -Name  ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 5

   HistoryId: 3

Message        : Operation returned an invalid status code 'BadRequest'
StackTrace     :    at Microsoft.Azure.Management.Consumption.BudgetsOperations.<CreateOrUpdateWithHttpMessagesAsync>d__8.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.<CreateOrUpdateAsync>d__7.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters)
                    at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet()
Exception      : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException
InvocationInfo : {New-AzConsumptionBudget}
Line           : New-AzConsumptionBudget -Amount 60 -Name PSBudget -Category Cost -StartDate 2020-04-01 -EndDate 2020-11-01 -TimeGrain Monthly
Position       : At line:1 char:1
                 + New-AzConsumptionBudget -Amount 60 -Name PSBudget -Category Cost -Sta ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 3

   HistoryId: 2

Message        : The term 'R@hul042020' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,
                 verify that the path is correct and try again.
StackTrace     :    at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandTypes commandTypes, SearchResolutionOptions searchResolutionOptions,
                 CommandOrigin commandOrigin, ExecutionContext context)
                    at System.Management.Automation.CommandDiscovery.LookupCommandProcessor(String commandName, CommandOrigin commandOrigin, Nullable`1 useLocalScope)
                    at System.Management.Automation.ExecutionContext.CreateCommand(String command, Boolean dotSource)
                    at System.Management.Automation.PipelineOps.AddCommand(PipelineProcessor pipe, CommandParameterInternal[] commandElements, CommandBaseAst commandBaseAst,
                 CommandRedirection[] redirections, ExecutionContext context)
                    at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[]
                 pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
                    at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.CommandNotFoundException
InvocationInfo : {}
Line           : R@hul042020
Position       : At line:1 char:1
                 + R@hul042020
                 + ~~~~~~~~~~~
HistoryId      : 2

   HistoryId: -1

Message        : Unable to find type [Microsoft.PowerShell.Commands.PowerShellGet.Telemetry].
StackTrace     :    at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
                    at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line           :     $telemetryMethods = ([Microsoft.PowerShell.Commands.PowerShellGet.Telemetry] | Get-Member -Static).Name

Position       : At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:715 char:26
                 + ... yMethods = ([Microsoft.PowerShell.Commands.PowerShellGet.Telemetry] | ...
                 +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : -1

DEBUG: AzureQoSEvent: CommandName - Resolve-AzError; IsSuccess - True; Duration - 00:00:02.1791813;
DEBUG: Finish sending metric.
DEBUG: 7:21:47 PM - ResolveError end processing.
ghost commented 4 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @amberbhargava, @shilpigautam, @ramaganesan-rg, @anand-rengasamy.

dingmeng-xue commented 4 years ago

Thanks for reporting the issue. Involve Billing service team to look into it.

ghost commented 4 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ms-premp.

coreskov commented 4 years ago

I have the same issue on my tenant, My tenant is created under the Microsoft Online Services Program.

The error message above states that the subscription is not associated with an Enterprise Agreement offering.

Body:
{
  "error": {
    "code": "400",
    "message": "Subscription da3ee1f7-9a76-4e64-8f36-b815da57a35f is not associated with EA offer type (Request ID: 7bd02b44-0734-4b68-9a67-c731279ed42c)"
  }
}

So it seems only EA offerings are allowed to create consumption budgets programmatically. I would be nice if that was stated explicitly in the documentation: https://docs.microsoft.com/en-us/powershell/module/az.billing/new-azconsumptionbudget?view=azps-4.2.0

Alternative: I have succeeded in creating budgets using ARM templates on MSOP offer: https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/quick-create-budget-template?tabs=CLI

Reference for types of billing accounts: https://docs.microsoft.com/en-us/azure/cost-management-billing/cost-management-billing-overview

ms-premp commented 4 years ago

This version of SDK uses an older version of API. This will be addressed by end of this year.

ramaganesan-rg commented 4 years ago

Closing as per Prem's comments

rupeshtech commented 4 years ago

@ms-premp when can we expect this bug to be resolved? What is alternative way, you suggest, to create consumption budget for large group of resource groups. image

mgdarg commented 3 years ago

Any news about any workaround or new psmodule vertion fix?

dingmeng-xue commented 3 years ago

Reopen this issue.

@ramaganesan-rg, the issue only can be closed when it is fixed and it won't be fixed with reasonable justification.

rupeshtech commented 3 years ago

@mgdarg I have created a workaround to set sonsumtpion budget thru restapi. Might be of ur help. https://gist.github.com/rupeshtech/2b7c4c4a8ab4103605409426547ac797

MikeyBronowski commented 3 years ago

This version of SDK uses an older version of API. This will be addressed by end of this year.

@ms-premp has this been fixed yet?

gokusupa commented 3 years ago

I too am having this issue. any update on maybe a possible fix date?

jayati-tehri commented 3 years ago

The current version of SDK support creating budgets only under the Enterprise Agreement offer type. Can you please try creating budgets using the REST API : https://docs.microsoft.com/en-us/rest/api/consumption/budgets/createorupdate

or through ARM template : https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/quick-create-budget-template?tabs=CLI

gokusupa commented 3 years ago

So in other words you removed perfectly good powershell functionality.

why?

nbnm commented 3 years ago

The same issue for Python SDK as well.

Traceback (most recent call last):
File "C:\Temp\zwqa4l2q.g2h\145d6e3a-123f-40b2-933f-54380c1fdcb8", line 138, in main()
File "C:\Temp\zwqa4l2q.g2h\145d6e3a-123f-40b2-933f-54380c1fdcb8", line 109, in main
consumption = consumption_client.budgets.create_or_update(
File "C:\WPy64-3800\python-3.8.0.amd64\lib\site-packages\azure\mgmt\consumption\operations\budgets_operations.py", line 278, in create_or_update
raise models.ErrorResponseException(self._deserialize, response)azure.mgmt.consumption.models.error_response.ErrorResponseException: (400) Cost Management supports only Enterprise Agreement, Web direct and Microsoft Customer Agreement offer types. Subscription aaaaaaaa is not associated with a valid offer type. (Request ID: 226328e6-2cfc-45ef-8a9c-3a1b70bc2e1d)

nitinarora-ms commented 3 years ago

Thanks for the feedback! We are aware of this limitation and its in our backlog to update the SDK. Unfortunately, we don't have a timeline yet. As soon as we can prioritize SDK update, we will update this thread. In the meantime, can you try creating budgets using the REST API - https://docs.microsoft.com/en-us/rest/api/consumption/budgets/createorupdate ?

ghost commented 3 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ccmaxpcrew.

Issue Details
## Description I am getting BadRequest error while creating Budget from Azure powershell ## Steps to reproduce Execute below command, after Login into Azure account and select your desired subscription context. ```powershell New-AzConsumptionBudget -Amount 6000 -Name PSBudget -Category Cost -StartDate 2020-04-01 -EndDate 2020-04-30 -TimeGrain Monthly ``` ## Environment data ``` $PSVersionTable Name Value ---- ----- PSVersion 5.1.18362.752 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.18362.752 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 ``` ## Module versions ```powershell Get-Module -ListAvailable Directory: C:\Users\M1058522\Documents\WindowsPowerShell\Modules ModuleType Version Name ExportedCommands ---------- ------- ---- ---------------- Script 1.7.2 Az.Accounts {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAutosave...} Script 1.1.1 Az.Advisor {Get-AzAdvisorRecommendation, Enable-AzAdvisorRecommendation, Disable-AzAdvisorRecommendation, Get-AzAdvisorConfiguration...} Script 1.0.3 Az.Aks {Get-AzAks, New-AzAks, Remove-AzAks, Import-AzAksCredential...} Script 1.1.2 Az.AnalysisServices {Resume-AzAnalysisServicesServer, Suspend-AzAnalysisServicesServer, Get-AzAnalysisServicesServer, Remove-AzAnalysisServicesServ... Script 1.3.4 Az.ApiManagement {Add-AzApiManagementApiToProduct, Add-AzApiManagementProductToGroup, Add-AzApiManagementRegion, Add-AzApiManagementUserToGroup...} Script 1.0.3 Az.ApplicationInsights {Get-AzApplicationInsights, New-AzApplicationInsights, Remove-AzApplicationInsights, Set-AzApplicationInsightsPricingPlan...} Script 1.3.6 Az.Automation {Get-AzAutomationHybridWorkerGroup, Remove-AzAutomationHybridWorkerGroup, Get-AzAutomationJobOutputRecord, Import-AzAutomationD... Script 2.0.2 Az.Batch {Remove-AzBatchAccount, Get-AzBatchAccount, Get-AzBatchAccountKey, New-AzBatchAccount...} Script 1.0.2 Az.Billing {Get-AzBillingInvoice, Get-AzBillingPeriod, Get-AzEnrollmentAccount, Get-AzConsumptionBudget...} Script 1.4.2 Az.Cdn {Get-AzCdnProfile, Get-AzCdnProfileSsoUrl, New-AzCdnProfile, Remove-AzCdnProfile...} Script 1.2.3 Az.CognitiveServices {Get-AzCognitiveServicesAccount, Get-AzCognitiveServicesAccountKey, Get-AzCognitiveServicesAccountSku, Get-AzCognitiveServicesA... Script 3.5.0 Az.Compute {Remove-AzAvailabilitySet, Get-AzAvailabilitySet, New-AzAvailabilitySet, Update-AzAvailabilitySet...} Script 1.0.3 Az.ContainerInstance {New-AzContainerGroup, Get-AzContainerGroup, Remove-AzContainerGroup, Get-AzContainerInstanceLog} Script 1.1.1 Az.ContainerRegistry {New-AzContainerRegistry, Get-AzContainerRegistry, Update-AzContainerRegistry, Remove-AzContainerRegistry...} Script 1.1.0 Az.DataBoxEdge {Get-AzDataBoxEdgeJob, Get-AzDataBoxEdgeDevice, Invoke-AzDataBoxEdgeDevice, New-AzDataBoxEdgeDevice...} Script 1.6.1 Az.DataFactory {Set-AzDataFactoryV2, Update-AzDataFactoryV2, Get-AzDataFactoryV2, Remove-AzDataFactoryV2...} Script 1.0.2 Az.DataLakeAnalytics {Get-AzDataLakeAnalyticsDataSource, New-AzDataLakeAnalyticsCatalogCredential, Remove-AzDataLakeAnalyticsCatalogCredential, Set-... Script 1.2.6 Az.DataLakeStore {Get-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeStoreFirewallRule, Set-AzDataL... Script 1.1.0 Az.DeploymentManager {Get-AzDeploymentManagerArtifactSource, New-AzDeploymentManagerArtifactSource, Set-AzDeploymentManagerArtifactSource, Remove-Az... Script 1.0.2 Az.DevTestLabs {Get-AzDtlAllowedVMSizesPolicy, Get-AzDtlAutoShutdownPolicy, Get-AzDtlAutoStartPolicy, Get-AzDtlVMsPerLabPolicy...} Script 1.1.2 Az.Dns {Get-AzDnsRecordSet, New-AzDnsRecordConfig, Remove-AzDnsRecordSet, Set-AzDnsRecordSet...} Script 1.2.3 Az.EventGrid {New-AzEventGridTopic, Get-AzEventGridTopic, Set-AzEventGridTopic, New-AzEventGridTopicKey...} Script 1.4.3 Az.EventHub {New-AzEventHubNamespace, Get-AzEventHubNamespace, Set-AzEventHubNamespace, Remove-AzEventHubNamespace...} Script 1.4.0 Az.FrontDoor {New-AzFrontDoor, Get-AzFrontDoor, Set-AzFrontDoor, Remove-AzFrontDoor...} Script 3.0.3 Az.HDInsight {Get-AzHDInsightJob, New-AzHDInsightSqoopJobDefinition, Wait-AzHDInsightJob, New-AzHDInsightStreamingMapReduceJobDefinition...} Script 1.0.1 Az.HealthcareApis {New-AzHealthcareApisService, Remove-AzHealthcareApisService, Set-AzHealthcareApisService, Get-AzHealthcareApisService} Script 2.1.0 Az.IotHub {Add-AzIotHubKey, Get-AzIotHubEventHubConsumerGroup, Get-AzIotHubConnectionString, Get-AzIotHubJob...} Script 1.5.1 Az.KeyVault {Add-AzKeyVaultCertificate, Update-AzKeyVaultCertificate, Stop-AzKeyVaultCertificateOperation, Get-AzKeyVaultCertificateOperati... Script 1.3.2 Az.LogicApp {Get-AzIntegrationAccountAgreement, Get-AzIntegrationAccountAssembly, Get-AzIntegrationAccountBatchConfiguration, Get-AzIntegra... Script 1.1.3 Az.MachineLearning {Move-AzMlCommitmentAssociation, Get-AzMlCommitmentAssociation, Get-AzMlCommitmentPlanUsageHistory, Remove-AzMlCommitmentPlan...} Script 1.0.2 Az.ManagedServices {Get-AzManagedServicesAssignment, New-AzManagedServicesAssignment, Remove-AzManagedServicesAssignment, Get-AzManagedServicesDef... Script 1.0.2 Az.MarketplaceOrdering {Get-AzMarketplaceTerms, Set-AzMarketplaceTerms} Script 1.1.1 Az.Media {Sync-AzMediaServiceStorageKey, Set-AzMediaServiceKey, Get-AzMediaServiceKey, Get-AzMediaServiceNameAvailability...} Script 1.6.0 Az.Monitor {Get-AzMetricDefinition, Get-AzMetric, Remove-AzLogProfile, Get-AzLogProfile...} Script 2.3.1 Az.Network {Add-AzApplicationGatewayAuthenticationCertificate, Get-AzApplicationGatewayAuthenticationCertificate, New-AzApplicationGateway... Script 1.1.1 Az.NotificationHubs {Get-AzNotificationHub, Get-AzNotificationHubAuthorizationRule, Get-AzNotificationHubListKey, Get-AzNotificationHubPNSCredentia... Script 1.3.4 Az.OperationalInsights {New-AzOperationalInsightsAzureActivityLogDataSource, New-AzOperationalInsightsCustomLogDataSource, Disable-AzOperationalInsigh... Script 1.2.0 Az.PolicyInsights {Get-AzPolicyEvent, Get-AzPolicyState, Get-AzPolicyStateSummary, Get-AzPolicyRemediation...} Script 1.1.1 Az.PowerBIEmbedded {Remove-AzPowerBIWorkspaceCollection, Get-AzPowerBIWorkspaceCollection, Get-AzPowerBIWorkspaceCollectionAccessKey, Get-AzPowerB... Script 1.0.2 Az.PrivateDns {Get-AzPrivateDnsZone, Remove-AzPrivateDnsZone, Set-AzPrivateDnsZone, New-AzPrivateDnsZone...} Script 2.7.0 Az.RecoveryServices {Get-AzRecoveryServicesBackupProperty, Get-AzRecoveryServicesVault, Get-AzRecoveryServicesVaultSettingsFile, New-AzRecoveryServ... Script 1.2.1 Az.RedisCache {Remove-AzRedisCachePatchSchedule, New-AzRedisCacheScheduleEntry, Get-AzRedisCachePatchSchedule, New-AzRedisCachePatchSchedule...} Script 1.0.3 Az.Relay {New-AzRelayNamespace, Get-AzRelayNamespace, Set-AzRelayNamespace, Remove-AzRelayNamespace...} Script 1.11.0 Az.Resources {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzRoleAssignment, New-AzRoleAssignment...} Script 1.4.1 Az.ServiceBus {New-AzServiceBusNamespace, Get-AzServiceBusNamespace, Set-AzServiceBusNamespace, Remove-AzServiceBusNamespace...} Script 2.0.1 Az.ServiceFabric {Add-AzServiceFabricClientCertificate, Add-AzServiceFabricClusterCertificate, Add-AzServiceFabricNode, Add-AzServiceFabricNodeT... Script 1.1.1 Az.SignalR {New-AzSignalR, Get-AzSignalR, Get-AzSignalRKey, New-AzSignalRKey...} Script 2.3.0 Az.Sql {Get-AzSqlDatabaseTransparentDataEncryption, Get-AzSqlDatabaseTransparentDataEncryptionActivity, Set-AzSqlDatabaseTransparentDa... Script 1.1.0 Az.SqlVirtualMachine {New-AzSqlVM, Get-AzSqlVM, Update-AzSqlVM, Remove-AzSqlVM...} Script 1.12.0 Az.Storage {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStorageAccount, New-AzStorageAccountKey...} Script 1.2.3 Az.StorageSync {Invoke-AzStorageSyncCompatibilityCheck, New-AzStorageSyncService, Get-AzStorageSyncService, Remove-AzStorageSyncService...} Script 1.0.1 Az.StreamAnalytics {Get-AzStreamAnalyticsFunction, Get-AzStreamAnalyticsDefaultFunctionDefinition, New-AzStreamAnalyticsFunction, Remove-AzStreamA... Script 1.0.3 Az.TrafficManager {Add-AzTrafficManagerCustomHeaderToEndpoint, Remove-AzTrafficManagerCustomHeaderFromEndpoint, Add-AzTrafficManagerCustomHeaderT... Script 1.6.0 Az.Websites {Get-AzAppServicePlan, Set-AzAppServicePlan, New-AzAppServicePlan, Remove-AzAppServicePlan...} Directory: C:\Program Files\WindowsPowerShell\Modules ModuleType Version Name ExportedCommands ---------- ------- ---- ---------------- Script 1.7.5 Az.Accounts {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAutosave...} Script 1.4.0 Az.ApiManagement {Add-AzApiManagementApiToProduct, Add-AzApiManagementProductToGroup, Add-AzApiManagementRegion, Add-AzApiManagementUserToGroup...} Script 3.6.0 Az.Compute {Remove-AzAvailabilitySet, Get-AzAvailabilitySet, New-AzAvailabilitySet, Update-AzAvailabilitySet...} Script 1.7.0 Az.DataFactory {Set-AzDataFactoryV2, Update-AzDataFactoryV2, Get-AzDataFactoryV2, Remove-AzDataFactoryV2...} Script 1.2.8 Az.DataLakeStore {Get-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeStoreFirewallRule, Set-AzDataL... Script 3.1.0 Az.HDInsight {Get-AzHDInsightJob, New-AzHDInsightSqoopJobDefinition, Wait-AzHDInsightJob, New-AzHDInsightStreamingMapReduceJobDefinition...} Script 2.3.0 Az.IotHub {Add-AzIotHubKey, Get-AzIotHubEventHubConsumerGroup, Get-AzIotHubConnectionString, Get-AzIotHubJob...} Script 1.5.2 Az.KeyVault {Add-AzKeyVaultCertificate, Update-AzKeyVaultCertificate, Stop-AzKeyVaultCertificateOperation, Get-AzKeyVaultCertificateOperati... Script 1.6.2 Az.Monitor {Get-AzMetricDefinition, Get-AzMetric, Remove-AzLogProfile, Get-AzLogProfile...} Script 2.4.0 Az.Network {Add-AzApplicationGatewayAuthenticationCertificate, Get-AzApplicationGatewayAuthenticationCertificate, New-AzApplicationGateway... Script 1.2.1 Az.PolicyInsights {Get-AzPolicyEvent, Get-AzPolicyState, Get-AzPolicyStateSummary, Get-AzPolicyRemediation...} Script 2.8.0 Az.RecoveryServices {Get-AzRecoveryServicesBackupProperty, Get-AzRecoveryServicesVault, Get-AzRecoveryServicesVaultSettingsFile, New-AzRecoveryServ... Script 1.13.0 Az.Resources {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzRoleAssignment, New-AzRoleAssignment...} Script 2.5.0 Az.Sql {Get-AzSqlDatabaseTransparentDataEncryption, Get-AzSqlDatabaseTransparentDataEncryptionActivity, Set-AzSqlDatabaseTransparentDa... Script 1.13.0 Az.Storage {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStorageAccount, New-AzStorageAccountKey...} Script 1.0.0 Az.Support {Get-AzSupportService, Get-AzSupportProblemClassification, Get-AzSupportTicket, Get-AzSupportTicketCommunication...} Script 1.8.0 Az.Websites {Get-AzAppServicePlan, Set-AzAppServicePlan, New-AzAppServicePlan, Remove-AzAppServicePlan...} Script 1.0.1 Microsoft.PowerShell.Operation.V... {Get-OperationValidation, Invoke-OperationValidation} Binary 1.0.0.1 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...} Script 3.4.0 Pester {Describe, Context, It, Should...} Script 1.0.0.1 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Module...} Script 2.0.0 PSReadline {Get-PSReadLineKeyHandler, Set-PSReadLineKeyHandler, Remove-PSReadLineKeyHandler, Get-PSReadLineOption...} Directory: C:\windows\system32\WindowsPowerShell\v1.0\Modules ModuleType Version Name ExportedCommands ---------- ------- ---- ---------------- Manifest 1.0.0.0 AppBackgroundTask {Disable-AppBackgroundTaskDiagnosticLog, Enable-AppBackgroundTaskDiagnosticLog, Set-AppBackgroundTaskResourcePolicy, Unregister... Manifest 2.0.0.0 AppLocker {Get-AppLockerFileInformation, Get-AppLockerPolicy, New-AppLockerPolicy, Set-AppLockerPolicy...} Manifest 1.0.0.0 AppvClient {Add-AppvClientConnectionGroup, Add-AppvClientPackage, Add-AppvPublishingServer, Disable-Appv...} Manifest 2.0.1.0 Appx {Add-AppxPackage, Get-AppxPackage, Get-AppxPackageManifest, Remove-AppxPackage...} Script 1.0.0.0 AssignedAccess {Clear-AssignedAccess, Get-AssignedAccess, Set-AssignedAccess} Manifest 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, Clear-BCCache, Disable-BC, Disable-BCDowngrading...} Manifest 1.0.0.0 CimCmdlets {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance, Get-CimSession...} Manifest 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-MpPreference, Remove-MpPreference...} Manifest 1.0.2.0 DeliveryOptimization {Delete-DeliveryOptimizationCache, Get-DeliveryOptimizationStatus, Set-DeliveryOptimizationStatus, Get-DeliveryOptimizationPerf... Manifest 1.0.0.0 DirectAccessClientComponents {Disable-DAManualEntryPointSelection, Enable-DAManualEntryPointSelection, Get-DAClientExperienceConfiguration, Get-DAEntryPoint... Script 3.0 Dism {Add-AppxProvisionedPackage, Add-WindowsDriver, Add-WindowsCapability, Add-WindowsImage...} Manifest 1.0.0.0 DnsClient {Resolve-DnsName, Clear-DnsClientCache, Get-DnsClient, Get-DnsClientCache...} Manifest 1.0.0.0 EventTracingManagement {Start-EtwTraceSession, New-EtwTraceSession, Get-EtwTraceSession, Update-EtwTraceSession...} Manifest 1.0.0.0 HgsClient {Get-HgsAttestationBaselinePolicy, Get-HgsClientConfiguration, Test-HgsClientConfiguration, Set-HgsClientConfiguration...} Manifest 1.0.0.0 HgsDiagnostics {New-HgsTraceTarget, Get-HgsTrace, Get-HgsTraceFileData, Test-HgsTraceTarget} Binary 1.0.0.0 HostComputeService {Get-ComputeProcess, Stop-ComputeProcess} Manifest 1.0.0.1 HostNetworkingService {Remove-HnsNamespace, Remove-HnsEndpoint, Get-HnsEndpoint, Remove-HnsPolicyList...} Binary 2.0.0.0 Hyper-V {Add-VMAssignableDevice, Add-VMDvdDrive, Add-VMFibreChannelHba, Add-VMGpuPartitionAdapter...} Binary 1.1 Hyper-V {Add-VMDvdDrive, Add-VMFibreChannelHba, Add-VMHardDiskDrive, Add-VMMigrationNetwork...} Manifest 2.0.0.0 International {Get-WinDefaultInputMethodOverride, Set-WinDefaultInputMethodOverride, Get-WinHomeLocation, Set-WinHomeLocation...} Manifest 1.0.0.0 iSCSI {Get-IscsiTargetPortal, New-IscsiTargetPortal, Remove-IscsiTargetPortal, Update-IscsiTargetPortal...} Script 1.0.0.0 ISE {New-IseSnippet, Import-IseSnippet, Get-IseSnippet} Manifest 1.0.0.0 Kds {Add-KdsRootKey, Get-KdsRootKey, Test-KdsRootKey, Set-KdsConfiguration...} Manifest 1.0.1.0 Microsoft.PowerShell.Archive {Compress-Archive, Expand-Archive} Manifest 3.0.0.0 Microsoft.PowerShell.Diagnostics {Get-WinEvent, Get-Counter, Import-Counter, Export-Counter...} Manifest 3.0.0.0 Microsoft.PowerShell.Host {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...} Script 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...} Manifest 1.0 MMAgent {Disable-MMAgent, Enable-MMAgent, Set-MMAgent, Get-MMAgent...} Manifest 1.0.0.0 MsDtc {New-DtcDiagnosticTransaction, Complete-DtcDiagnosticTransaction, Join-DtcDiagnosticResourceManager, Receive-DtcDiagnosticTrans... Manifest 2.0.0.0 NetAdapter {Disable-NetAdapter, Disable-NetAdapterBinding, Disable-NetAdapterChecksumOffload, Disable-NetAdapterEncapsulatedPacketTaskOffl... Manifest 1.0.0.0 NetConnection {Get-NetConnectionProfile, Set-NetConnectionProfile} Manifest 1.0.0.0 NetEventPacketCapture {New-NetEventSession, Remove-NetEventSession, Get-NetEventSession, Set-NetEventSession...} Manifest 2.0.0.0 NetLbfo {Add-NetLbfoTeamMember, Add-NetLbfoTeamNic, Get-NetLbfoTeam, Get-NetLbfoTeamMember...} Manifest 1.0.0.0 NetNat {Get-NetNat, Get-NetNatExternalAddress, Get-NetNatStaticMapping, Get-NetNatSession...} Manifest 2.0.0.0 NetQos {Get-NetQosPolicy, Set-NetQosPolicy, Remove-NetQosPolicy, New-NetQosPolicy} Manifest 2.0.0.0 NetSecurity {Get-DAPolicyChange, New-NetIPsecAuthProposal, New-NetIPsecMainModeCryptoProposal, New-NetIPsecQuickModeCryptoProposal...} Manifest 1.0.0.0 NetSwitchTeam {New-NetSwitchTeam, Remove-NetSwitchTeam, Get-NetSwitchTeam, Rename-NetSwitchTeam...} Manifest 1.0.0.0 NetTCPIP {Get-NetIPAddress, Get-NetIPInterface, Get-NetIPv4Protocol, Get-NetIPv6Protocol...} Manifest 1.0.0.0 NetworkConnectivityStatus {Get-DAConnectionStatus, Get-NCSIPolicyConfiguration, Reset-NCSIPolicyConfiguration, Set-NCSIPolicyConfiguration} Manifest 1.0.0.0 NetworkSwitchManager {Disable-NetworkSwitchEthernetPort, Enable-NetworkSwitchEthernetPort, Get-NetworkSwitchEthernetPort, Remove-NetworkSwitchEthern... Manifest 1.0.0.0 NetworkTransition {Add-NetIPHttpsCertBinding, Disable-NetDnsTransitionConfiguration, Disable-NetIPHttpsProfile, Disable-NetNatTransitionConfigura... Manifest 1.0.0.0 PcsvDevice {Get-PcsvDevice, Start-PcsvDevice, Stop-PcsvDevice, Restart-PcsvDevice...} Binary 1.0.0.0 PersistentMemory {Get-PmemDisk, Get-PmemPhysicalDevice, Get-PmemUnusedRegion, New-PmemDisk...} Manifest 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-Printer, Add-PrinterDriver, Add-PrinterPort, Get-PrintConfiguration...} Binary 1.0.11 ProcessMitigations {Get-ProcessMitigation, Set-ProcessMitigation, ConvertTo-ProcessMitigationPolicy} Script 3.0 Provisioning {Install-ProvisioningPackage, Export-ProvisioningPackage, Install-TrustedProvisioningCertificate, Export-Trace...} Manifest 1.1 PSDesiredStateConfiguration {Set-DscLocalConfigurationManager, Start-DscConfiguration, Test-DscConfiguration, Publish-DscConfiguration...} Script 1.0.0.0 PSDiagnostics {Disable-PSTrace, Disable-PSWSManCombinedTrace, Disable-WSManTrace, Enable-PSTrace...} Binary 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...} Manifest 2.0.0.0 SecureBoot {Confirm-SecureBootUEFI, Set-SecureBootUEFI, Get-SecureBootUEFI, Format-SecureBootUEFI...} Manifest 2.0.0.0 SmbShare {Get-SmbShare, Remove-SmbShare, Set-SmbShare, Block-SmbShareAccess...} Manifest 2.0.0.0 SmbWitness {Get-SmbWitnessClient, Move-SmbWitnessClient, gsmbw, msmbw...} Manifest 1.0.0.0 StartLayout {Export-StartLayout, Import-StartLayout, Export-StartLayoutEdgeAssets, Get-StartApps} Manifest 2.0.0.0 Storage {Add-InitiatorIdToMaskingSet, Add-PartitionAccessPath, Add-PhysicalDisk, Add-StorageFaultDomain...} Manifest 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...} Binary 2.1.639.0 UEV {Clear-UevConfiguration, Clear-UevAppxPackage, Restore-UevBackup, Set-UevTemplateProfile...} Manifest 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} Script 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...} Directory: C:\Program Files (x86)\Microsoft Azure Information Protection\Powershell ModuleType Version Name ExportedCommands ---------- ------- ---- ---------------- Binary 1.10.56.0 AzureInformationProtection {Clear-RMSAuthentication, Get-AIPFileStatus, Get-RMSFileStatus, Get-RMSServer...} ``` ## Debug output ``` New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost' -StartDate '2020-04-01' -EndDate '2020-05-31' -TimeGrain Monthly DEBUG: 7:20:54 PM - NewAzureRmConsumptionBudget begin processing with ParameterSet 'Subscription'. DEBUG: 7:20:54 PM - using account id 'rahul.nandan2020@outlook.com'... DEBUG: [Common.Authentication]: Authenticating using Account: 'rahul.nandan2020@outlook.com', environment: 'AzureCloud', tenant: '02364136-a9d4-4319-9235-74b857c7753a' DEBUG: [Common.Authentication]: Authenticating using configuration values: Domain: '02364136-a9d4-4319-9235-74b857c7753a', Endpoint: 'https://login.microsoftonline.com/', ClientId: '1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirect: 'urn:ietf:wg:oauth:2.0:oob', ResourceClientUri: 'https://management.core.windows.net/', ValidateAuthority: 'True' DEBUG: [Common.Authentication]: Acquiring token using context with Authority 'https://login.microsoftonline.com/02364136-a9d4-4319-9235-74b857c7753a/', CorrelationId: '00000000-0000-0000-0000-000000000000', ValidateAuthority: 'True' DEBUG: [Common.Authentication]: Acquiring token using AdalConfiguration with Domain: '02364136-a9d4-4319-9235-74b857c7753a', AdEndpoint: 'https://login.microsoftonline.com/', ClientId: '1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirectUri: urn:ietf:wg:oauth:2.0:oob DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0931333Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: ADAL PCL.Desktop with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running... DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0931333Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: ADAL PCL.Desktop with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running... DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0931333Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: === Token Acquisition started: CacheType: null Authentication Target: User , Authority Host: login.microsoftonline.com DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0931333Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: === Token Acquisition started: Authority: https://login.microsoftonline.com/02364136-a9d4-4319-9235-74b857c7753a/ Resource: https://management.core.windows.net/ ClientId: 1950a258-227b-4e31-a9cf-717495945fc2 CacheType: null Authentication Target: User DEBUG: [ADAL]: Verbose: 2020-04-20T13:50:54.0931333Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: Loading from cache. DEBUG: [ADAL]: Verbose: 2020-04-20T13:50:54.0931333Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: Loading from cache. DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0931333Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs: Deserialized 2 items to token cache. DEBUG: [ADAL]: Verbose: 2020-04-20T13:50:54.0941351Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: Looking up cache for a token... DEBUG: [ADAL]: Verbose: 2020-04-20T13:50:54.0941351Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: Looking up cache for a token... DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0941351Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: An item matching the requested resource was found in the cache DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0941351Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: An item matching the requested resource was found in the cache DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0941351Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: 10.8418477483333 minutes left until token in cache expires DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0941351Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: 10.8418477483333 minutes left until token in cache expires DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0941351Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: A matching item (access token or refresh token or both) was found in the cache DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0941351Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: A matching item (access token or refresh token or both) was found in the cache DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0941351Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned: Expiration Time: 4/20/2020 2:01:44 PM +00:00 DEBUG: [ADAL]: Information: 2020-04-20T13:50:54.0941351Z: ed9b54ae-0c69-423c-97aa-f601fbc5f408 - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned: Expiration Time: 4/20/2020 2:01:44 PM +00:00Access Token Hash: L0oblb112ZINKGKWaeFR7M3E4p6ZIk2PCLGfLHsmHY0= User id: fee281af-ee28-47b8-8313-3f47a963c6e7 DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '04/20/2020 14:01:44 +00:00', MultipleResource? 'True', Tenant: '02364136-a9d4-4319-9235-74b857c7753a', UserId: 'rahul.nandan2020@outlook.com' DEBUG: [Common.Authentication]: User info for token DisplayId: 'rahul.nandan2020@outlook.com', Name: Rahul Nandan, IdProvider: 'live.com', Uid: 'fee281af-ee28-47b8-8313-3f47a963c6e7' DEBUG: [Common.Authentication]: Checking token expiration, token expires '04/20/2020 14:01:44 +00:00' Comparing to '04/20/2020 13:50:54 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:10:50.4985853' DEBUG: ============================ HTTP REQUEST ============================ HTTP Method: PUT Absolute Uri: https://management.azure.com/subscriptions/da3ee1f7-9a76-4e64-8f36-b815da57a35f/providers/Microsoft.Consumption/budgets/PSBudget?api-version=2018-01-31 Headers: x-ms-client-request-id : ec25672a-5120-4c8c-a287-2d5374f5d55f accept-language : en-US Body: { "properties": { "category": "Cost", "amount": 6000.0, "timeGrain": "Monthly", "timePeriod": { "startDate": "2020-04-01T00:00:00Z", "endDate": "2020-05-31T00:00:00Z" }, "filters": {}, "notifications": {} } } DEBUG: ============================ HTTP RESPONSE ============================ Status Code: BadRequest Headers: Pragma : no-cache session-id : 6b46a690-f8dc-4f91-abb4-3c8e979bd045 x-ms-request-id : 7bd02b44-0734-4b68-9a67-c731279ed42c x-ms-correlation-request-id : cefbe690-5a4b-49e6-9a9f-69e320d03663 x-ms-client-request-id : 3073ffa6-80ed-450f-aa63-5f0bf59f97b2 Access-Control-Allow-Origin : * X-Content-Type-Options : nosniff Strict-Transport-Security : max-age=31536000; includeSubDomains x-ms-ratelimit-remaining-subscription-writes: 1199 x-ms-routing-request-id : WESTINDIA:20200420T135109Z:cefbe690-5a4b-49e6-9a9f-69e320d03663 Cache-Control : no-cache Date : Mon, 20 Apr 2020 13:51:08 GMT Body: { "error": { "code": "400", "message": "Subscription da3ee1f7-9a76-4e64-8f36-b815da57a35f is not associated with EA offer type (Request ID: 7bd02b44-0734-4b68-9a67-c731279ed42c)" } } New-AzConsumptionBudget : Operation returned an invalid status code 'BadRequest' At line:1 char:1 + New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [New-AzConsumptionBudget], ErrorResponseException + FullyQualifiedErrorId : Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget DEBUG: AzureQoSEvent: CommandName - New-AzConsumptionBudget; IsSuccess - False; Duration - 00:00:02.2973388;; Exception - Microsoft.Azure.Management.Consumption.Models.ErrorResponseException: Operation returned an invalid status code 'BadRequest' at Microsoft.Azure.Management.Consumption.BudgetsOperations.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters) at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet(); DEBUG: Finish sending metric. DEBUG: 7:20:57 PM - NewAzureRmConsumptionBudget end processing. ``` ## Error output ``` Resolve-AzError DEBUG: 7:21:44 PM - ResolveError begin processing with ParameterSet 'AnyErrorParameterSet'. DEBUG: 7:21:44 PM - using account id 'rahul.nandan2020@outlook.com'... WARNING: Breaking changes in the cmdlet 'Resolve-AzError' : WARNING: - The `Resolve-Error` alias will be removed in a future release. Please change any scripts that use this alias to use `Resolve-AzError` instead. WARNING: NOTE : Go to https://aka.ms/azps-changewarnings for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell. HistoryId: 42 Message : Operation returned an invalid status code 'BadRequest' StackTrace : at Microsoft.Azure.Management.Consumption.BudgetsOperations.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters) at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet() Exception : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException InvocationInfo : {New-AzConsumptionBudget} Line : New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost' -StartDate '2020-04-01' -EndDate '2020-05-31' -TimeGrain Monthly Position : At line:1 char:1 + New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : 42 HistoryId: 37 Message : Operation returned an invalid status code 'BadRequest' StackTrace : at Microsoft.Azure.Management.Consumption.BudgetsOperations.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters) at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet() Exception : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException InvocationInfo : {New-AzConsumptionBudget} Line : New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost' -StartDate '2020-04-01' -EndDate '2020-05-31' -TimeGrain Monthly Position : At line:1 char:1 + New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : 37 HistoryId: 35 Message : Operation returned an invalid status code 'BadRequest' StackTrace : at Microsoft.Azure.Management.Consumption.BudgetsOperations.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters) at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet() Exception : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException InvocationInfo : {New-AzConsumptionBudget} Line : New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost' -StartDate '2020-04-01' -EndDate '2020-05-31' -TimeGrain Monthly Position : At line:1 char:1 + New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : 35 HistoryId: 33 Message : Operation returned an invalid status code 'BadRequest' StackTrace : at Microsoft.Azure.Management.Consumption.BudgetsOperations.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters) at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet() Exception : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException InvocationInfo : {New-AzConsumptionBudget} Line : New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost' -StartDate '2020-04-01' -EndDate '2020-05-31' -TimeGrain Monthly Position : At line:1 char:1 + New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : 33 HistoryId: 31 Message : Operation returned an invalid status code 'BadRequest' StackTrace : at Microsoft.Azure.Management.Consumption.BudgetsOperations.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters) at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet() Exception : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException InvocationInfo : {New-AzConsumptionBudget} Line : New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost' -StartDate '2020-04-01' -EndDate '2020-05-31' -TimeGrain Monthly Position : At line:1 char:1 + New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : 31 HistoryId: 27 Message : Parameter set cannot be resolved using the specified named parameters. StackTrace : at System.Management.Automation.CmdletParameterBinderController.ThrowAmbiguousParameterSetException(UInt32 parameterSetFlags, MergedCommandParameterMetadata bindableParameters) at System.Management.Automation.CmdletParameterBinderController.ValidateParameterSets(Boolean prePipelineInput, Boolean setDefault) at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments) at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments) at System.Management.Automation.CommandProcessor.BindCommandLineParameters() at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues) at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues) at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream) at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input) at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext) at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) Exception : System.Management.Automation.ParameterBindingException InvocationInfo : {Set-PSDebug} Line : Set-PSDebug Position : At line:1 char:1 + Set-PSDebug + ~~~~~~~~~~~ HistoryId : 27 Message : Unable to find repository 'Name'. Use Get-PSRepository to see all available repositories. StackTrace : Exception : System.Exception InvocationInfo : {Get-PackageSource} Line : $packageSources = PackageManagement\Get-PackageSource @PSBoundParameters Position : At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:4489 char:35 + ... ckageSources = PackageManagement\Get-PackageSource @PSBoundParameters + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : 27 HistoryId: 26 Message : Operation returned an invalid status code 'BadRequest' StackTrace : at Microsoft.Azure.Management.Consumption.BudgetsOperations.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters) at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet() Exception : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException InvocationInfo : {New-AzConsumptionBudget} Line : New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost' -StartDate '2020-04-01' -EndDate '2020-05-31' -TimeGrain Monthly Position : At line:1 char:1 + New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : 26 HistoryId: 25 Message : Operation returned an invalid status code 'BadRequest' StackTrace : at Microsoft.Azure.Management.Consumption.BudgetsOperations.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters) at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet() Exception : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException InvocationInfo : {New-AzConsumptionBudget} Line : New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost' -StartDate '2020-04-01' -EndDate '2020-05-31' -TimeGrain Monthly -ContactEmail 'rahul.nandan2020@outlook.com' Position : At line:1 char:1 + New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : 25 HistoryId: 22 Message : Operation returned an invalid status code 'BadRequest' StackTrace : at Microsoft.Azure.Management.Consumption.BudgetsOperations.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters) at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet() Exception : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException InvocationInfo : {New-AzConsumptionBudget} Line : New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost' -StartDate '2020-04-01' -EndDate '2020-05-31' -TimeGrain Monthly -ContactEmail 'rahul.nandan2020@outlook.com' Position : At line:1 char:1 + New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : 22 HistoryId: 21 Message : Operation returned an invalid status code 'BadRequest' StackTrace : at Microsoft.Azure.Management.Consumption.BudgetsOperations.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters) at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet() Exception : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException InvocationInfo : {New-AzConsumptionBudget} Line : New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost' -StartDate '2020-04-01' -EndDate '2020-05-31' -TimeGrain Monthly Position : At line:1 char:1 + New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : 21 HistoryId: 19 Message : Operation returned an invalid status code 'BadRequest' StackTrace : at Microsoft.Azure.Management.Consumption.BudgetsOperations.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters) at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet() Exception : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException InvocationInfo : {New-AzConsumptionBudget} Line : New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost' -StartDate 2020-04-01 -EndDate 2020-04-30 -TimeGrain Monthly Position : At line:1 char:1 + New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category 'Cost ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : 19 HistoryId: 18 Message : Operation returned an invalid status code 'BadRequest' StackTrace : at Microsoft.Azure.Management.Consumption.BudgetsOperations.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters) at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet() Exception : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException InvocationInfo : {New-AzConsumptionBudget} Line : New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category Cost -StartDate 2020-04-01 -EndDate 2020-04-30 -TimeGrain Monthly Position : At line:1 char:1 + New-AzConsumptionBudget -Amount 6000 -Name 'PSBudget' -Category Cost ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : 18 HistoryId: 14 Message : Operation returned an invalid status code 'BadRequest' StackTrace : at Microsoft.Azure.Management.Consumption.BudgetsOperations.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters) at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet() Exception : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException InvocationInfo : {New-AzConsumptionBudget} Line : New-AzConsumptionBudget -Amount 6000 -Name PSBudget -Category Cost -StartDate 2020-04-01 -EndDate 2020-04-30 -TimeGrain Monthly Position : At line:1 char:1 + New-AzConsumptionBudget -Amount 6000 -Name PSBudget -Category Cost -S ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : 14 HistoryId: 10 Message : Operation returned an invalid status code 'BadRequest' StackTrace : at Microsoft.Azure.Management.Consumption.BudgetsOperations.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters) at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet() Exception : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException InvocationInfo : {New-AzConsumptionBudget} Line : New-AzConsumptionBudget -Amount 6000 -Name PSBudget -Category Cost -StartDate 2020-04-01 -EndDate 2020-04-30 -TimeGrain Monthly Position : At line:1 char:1 + New-AzConsumptionBudget -Amount 6000 -Name PSBudget -Category Cost -S ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : 10 HistoryId: 6 Message : Operation returned an invalid status code 'BadRequest' StackTrace : at Microsoft.Azure.Management.Consumption.BudgetsOperations.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters) at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet() Exception : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException InvocationInfo : {New-AzConsumptionBudget} Line : New-AzConsumptionBudget -Amount 6000 -Name PSBudget -Category Cost -StartDate 2020-04-01 -EndDate 2020-04-30 -TimeGrain Monthly Position : At line:1 char:1 + New-AzConsumptionBudget -Amount 6000 -Name PSBudget -Category Cost -S ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : 6 HistoryId: 5 Message : Operation returned an invalid status code 'BadRequest' StackTrace : at Microsoft.Azure.Management.Consumption.BudgetsOperations.d__11.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.d__13.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdateByResourceGroupName(IBudgetsOperations operations, String resourceGroupName, String budgetName, Budget parameters) at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet() Exception : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException InvocationInfo : {New-AzConsumptionBudget} Line : New-AzConsumptionBudget -Amount 6000 -ResourceGroupName testrg -Name PSBudget -Category Cost -StartDate 2020-04-01 -EndDate 2020-11-01 -TimeGrain Monthly Position : At line:1 char:1 + New-AzConsumptionBudget -Amount 6000 -ResourceGroupName testrg -Name ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : 5 HistoryId: 3 Message : Operation returned an invalid status code 'BadRequest' StackTrace : at Microsoft.Azure.Management.Consumption.BudgetsOperations.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.CreateOrUpdate(IBudgetsOperations operations, String budgetName, Budget parameters) at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.NewAzureRmConsumptionBudget.ExecuteCmdlet() Exception : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException InvocationInfo : {New-AzConsumptionBudget} Line : New-AzConsumptionBudget -Amount 60 -Name PSBudget -Category Cost -StartDate 2020-04-01 -EndDate 2020-11-01 -TimeGrain Monthly Position : At line:1 char:1 + New-AzConsumptionBudget -Amount 60 -Name PSBudget -Category Cost -Sta ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : 3 HistoryId: 2 Message : The term 'R@hul042020' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. StackTrace : at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandTypes commandTypes, SearchResolutionOptions searchResolutionOptions, CommandOrigin commandOrigin, ExecutionContext context) at System.Management.Automation.CommandDiscovery.LookupCommandProcessor(String commandName, CommandOrigin commandOrigin, Nullable`1 useLocalScope) at System.Management.Automation.ExecutionContext.CreateCommand(String command, Boolean dotSource) at System.Management.Automation.PipelineOps.AddCommand(PipelineProcessor pipe, CommandParameterInternal[] commandElements, CommandBaseAst commandBaseAst, CommandRedirection[] redirections, ExecutionContext context) at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext) at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) Exception : System.Management.Automation.CommandNotFoundException InvocationInfo : {} Line : R@hul042020 Position : At line:1 char:1 + R@hul042020 + ~~~~~~~~~~~ HistoryId : 2 HistoryId: -1 Message : Unable to find type [Microsoft.PowerShell.Commands.PowerShellGet.Telemetry]. StackTrace : at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception) at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) Exception : System.Management.Automation.RuntimeException InvocationInfo : {} Line : $telemetryMethods = ([Microsoft.PowerShell.Commands.PowerShellGet.Telemetry] | Get-Member -Static).Name Position : At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:715 char:26 + ... yMethods = ([Microsoft.PowerShell.Commands.PowerShellGet.Telemetry] | ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HistoryId : -1 DEBUG: AzureQoSEvent: CommandName - Resolve-AzError; IsSuccess - True; Duration - 00:00:02.1791813; DEBUG: Finish sending metric. DEBUG: 7:21:47 PM - ResolveError end processing. ```
Author: rahulNandan
Assignees: -
Labels: `Consumption`, `Consumption-Budget`, `Service Attention`, `bug`, `customer-reported`
Milestone: -
nitinarora-ms commented 3 years ago

We are tracking update of SDK in our backlog and we will update once we have made progress in this direction. In the meantime, users can leverage Rest APIs to create Budget - https://docs.microsoft.com/en-us/rest/api/consumption/budgets/createorupdate . Closing this item.

simone-bennett commented 2 years ago

Has this been fixed up yet? I'm trying to programmatically create a budget and getting an error still:

Body: { "error": { "code": "400", "message": "Cost Management supports only Enterprise Agreement, Web direct and Microsoft Customer Agreement offer types. Subscription nnnn-nnnnn-nnn-nnnnnn is not associated with a valid offer type" } }