Set-AzActivityLogAlert doesn't work with existing action group
Description
Using latest PowerShell modules, the Set-AzActivityLogAlert command does not work. I am using it with an existing action group and I've tried it with a new action group and it still doesn't work. I referenced https://github.com/Azure/azure-powershell/issues/5540 have tried using the New-Object workaround since it appears the powershell cmdlets are broken and referencing Azure SDK type and it still doesn't work. I keep getting badrequest.
Steps to reproduce
$subscriptionId = "c5930ba8-5b04-4664-9267-72bcef385673"
Set-AzContext -SubscriptionId $subscriptionId
$location = 'Global'
$alertName = "Test Storage Account Administrative Operations"
$resourceGroupName = 'AzureSentinelRG-01'
$scope = "/subscriptions/c5930ba8-5b04-4664-9267-72bcef385673/"
$condition1 = New-AzActivityLogAlertCondition -Field 'Category' -Equal 'Administrative'
$condition2 = New-AzActivityLogAlertCondition -Field 'Signal name' -Equal 'All Administrative operations'
$alertDescription = "Test description"
$actionGroup = Get-AzActionGroup -Name "ActionGroup-01" -ResourceGroupName $resourceGroupName
#Old object name
$actionGroupObject1 = New-Object Microsoft.Azure.Management.Monitor.Models.ActivityLogAlertActionGroup
#New object name
$actionGroupObject2 = New-Object Microsoft.Azure.Management.Monitor.Management.Models.ActivityLogAlertActionGroup
#$actionGroupObject1 = New-Object Microsoft.Azure.Management.Monitor.Models.ActivityLogAlertActionGroup $actionGroup.Id
#this command is broken: $actionGroupObject2 = New-Object Microsoft.Azure.Management.Monitor.Management.Models.ActivityLogAlertActionGroup $actionGroup.Id
$actionGroupObject1.ActionGroupId = $actionGroup.Id
$actionGroupObject2.ActionGroupId = $actionGroup.Id
Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName -Scope $scope -Action $actionGroupObject1 -Condition $condition1, $condition2 -Description $alertDescription
Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName -Scope $scope -Action $actionGroupObject2 -Condition $condition1, $condition2 -Description $alertDescription
$actionGroup2 = New-AzActionGroup -ActionGroupId $actionGroup.Id
Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName -Scope $scope -Action $actionGroup2 -Condition $condition1, $condition2 -Description $alertDescription
Environment data
PS C:\WINDOWS\system32> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.19041.1
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.1
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Module versions
PS C:\WINDOWS\system32> Get-Module -ListAvailable
Directory: C:\Users\jenguyen\OneDrive - Microsoft\Documents\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 1.4.7 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-Packa...
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 1.9.4 Az.Accounts {Disable-AzDataCollection, Disable-AzContextAutosave, Enab...
Script 1.5.2 Az.Accounts {Disable-AzDataCollection, Disable-AzContextAutosave, Enab...
Script 1.1.1 Az.Advisor {Get-AzAdvisorRecommendation, Enable-AzAdvisorRecommendati...
Script 1.3.0 Az.Aks {Get-AzAksCluster, New-AzAksCluster, Remove-AzAksCluster, ...
Script 1.0.1 Az.Aks {Get-AzAks, New-AzAks, Remove-AzAks, Import-AzAksCredentia...
Script 1.1.4 Az.AnalysisServices {Resume-AzAnalysisServicesServer, Suspend-AzAnalysisServic...
Script 1.1.0 Az.AnalysisServices {Resume-AzAnalysisServicesServer, Suspend-AzAnalysisServic...
Script 2.1.0 Az.ApiManagement {Add-AzApiManagementApiToGateway, Add-AzApiManagementApiTo...
Script 1.1.0 Az.ApiManagement {Add-AzApiManagementApiToProduct, Add-AzApiManagementProdu...
Script 1.1.0 Az.ApplicationInsights {Get-AzApplicationInsights, New-AzApplicationInsights, Rem...
Script 1.0.0 Az.ApplicationInsights {Get-AzApplicationInsights, New-AzApplicationInsights, Rem...
Script 1.4.0 Az.Automation {Get-AzAutomationHybridWorkerGroup, Remove-AzAutomationHyb...
Script 1.2.2 Az.Automation {Get-AzAutomationHybridWorkerGroup, Remove-AzAutomationHyb...
Script 3.1.0 Az.Batch {Remove-AzBatchAccount, Get-AzBatchAccount, Get-AzBatchAcc...
Script 1.1.0 Az.Batch {Remove-AzBatchAccount, Get-AzBatchAccount, Get-AzBatchAcc...
Script 1.0.3 Az.Billing {Get-AzBillingInvoice, Get-AzBillingPeriod, Get-AzEnrollme...
Script 1.0.0 Az.Billing {Get-AzBillingInvoice, Get-AzBillingPeriod, Get-AzEnrollme...
Script 1.4.3 Az.Cdn {Get-AzCdnProfile, Get-AzCdnProfileSsoUrl, New-AzCdnProfil...
Script 1.2.0 Az.Cdn {Get-AzCdnProfile, Get-AzCdnProfileSsoUrl, New-AzCdnProfil...
Script 1.6.0 Az.CognitiveServices {Get-AzCognitiveServicesAccount, Get-AzCognitiveServicesAc...
Script 1.1.1 Az.CognitiveServices {Get-AzCognitiveServicesAccount, Get-AzCognitiveServicesAc...
Script 4.4.0 Az.Compute {Remove-AzAvailabilitySet, Get-AzAvailabilitySet, New-AzAv...
Script 2.1.0 Az.Compute {Remove-AzAvailabilitySet, Get-AzAvailabilitySet, New-AzAv...
Script 1.0.3 Az.ContainerInstance {New-AzContainerGroup, Get-AzContainerGroup, Remove-AzCont...
Script 1.0.1 Az.ContainerInstance {New-AzContainerGroup, Get-AzContainerGroup, Remove-AzCont...
Script 1.1.1 Az.ContainerRegistry {New-AzContainerRegistry, Get-AzContainerRegistry, Update-...
Script 1.0.1 Az.ContainerRegistry {New-AzContainerRegistry, Get-AzContainerRegistry, Update-...
Script 1.1.0 Az.DataBoxEdge {Get-AzDataBoxEdgeJob, Get-AzDataBoxEdgeDevice, Invoke-AzD...
Script 1.10.1 Az.DataFactory {Set-AzDataFactoryV2, Update-AzDataFactoryV2, Get-AzDataFa...
Script 1.1.1 Az.DataFactory {Set-AzDataFactoryV2, Update-AzDataFactoryV2, Get-AzDataFa...
Script 1.0.2 Az.DataLakeAnalytics {Get-AzDataLakeAnalyticsDataSource, New-AzDataLakeAnalytic...
Script 1.0.0 Az.DataLakeAnalytics {Get-AzDataLakeAnalyticsDataSource, New-AzDataLakeAnalytic...
Script 1.2.8 Az.DataLakeStore {Get-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeSt...
Script 1.2.1 Az.DataLakeStore {Get-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeSt...
Script 1.0.0 Az.DataShare {New-AzDataShareAccount, Get-AzDataShareAccount, Remove-Az...
Script 1.1.0 Az.DeploymentManager {Get-AzDeploymentManagerArtifactSource, New-AzDeploymentMa...
Script 1.0.0 Az.DeploymentManager {Get-AzDeploymentManagerArtifactSource, New-AzDeploymentMa...
Script 1.0.0 Az.DesktopVirtualization {Disconnect-AzWvdUserSession, Get-AzWvdApplication, Get-Az...
Script 1.0.2 Az.DevTestLabs {Get-AzDtlAllowedVMSizesPolicy, Get-AzDtlAutoShutdownPolic...
Script 1.0.0 Az.DevTestLabs {Get-AzDtlAllowedVMSizesPolicy, Get-AzDtlAutoShutdownPolic...
Script 1.1.2 Az.Dns {Get-AzDnsRecordSet, New-AzDnsRecordConfig, Remove-AzDnsRe...
Script 1.1.0 Az.Dns {Get-AzDnsRecordSet, New-AzDnsRecordConfig, Remove-AzDnsRe...
Script 1.3.0 Az.EventGrid {New-AzEventGridTopic, Get-AzEventGridTopic, Set-AzEventGr...
Script 1.1.1 Az.EventGrid {New-AzEventGridTopic, Get-AzEventGridTopic, Set-AzEventGr...
Script 1.6.0 Az.EventHub {New-AzEventHubNamespace, Get-AzEventHubNamespace, Set-AzE...
Script 1.1.0 Az.EventHub {New-AzEventHubNamespace, Get-AzEventHubNamespace, Set-AzE...
Script 1.6.1 Az.FrontDoor {New-AzFrontDoor, Get-AzFrontDoor, Set-AzFrontDoor, Remove...
Script 1.0.0 Az.FrontDoor {New-AzFrontDoor, Get-AzFrontDoor, Set-AzFrontDoor, Remove...
Script 1.0.2 Az.Functions {Get-AzFunctionApp, Get-AzFunctionAppAvailableLocation, Ge...
Script 3.6.0 Az.HDInsight {Get-AzHDInsightJob, New-AzHDInsightSqoopJobDefinition, Wa...
Script 2.0.0 Az.HDInsight {Get-AzHDInsightJob, New-AzHDInsightSqoopJobDefinition, Wa...
Script 1.1.0 Az.HealthcareApis {New-AzHealthcareApisService, Remove-AzHealthcareApisServi...
Script 2.5.0 Az.IotHub {Add-AzIotHubKey, Get-AzIotHubEventHubConsumerGroup, Get-A...
Script 1.1.0 Az.IotHub {Add-AzIotHubKey, Get-AzIotHubEventHubConsumerGroup, Get-A...
Script 2.2.0 Az.KeyVault {Add-AzKeyVaultCertificate, Update-AzKeyVaultCertificate, ...
Script 1.2.0 Az.KeyVault {Add-AzKeyVaultCertificate, Update-AzKeyVaultCertificate, ...
Script 1.0.0 Az.Kusto {Add-AzKustoClusterLanguageExtension, Add-AzKustoDatabaseP...
Script 1.3.2 Az.LogicApp {Get-AzIntegrationAccountAgreement, Get-AzIntegrationAccou...
Script 1.2.1 Az.LogicApp {Get-AzIntegrationAccountAgreement, Get-AzIntegrationAccou...
Script 1.1.3 Az.MachineLearning {Move-AzMlCommitmentAssociation, Get-AzMlCommitmentAssocia...
Script 1.1.0 Az.MachineLearning {Move-AzMlCommitmentAssociation, Get-AzMlCommitmentAssocia...
Script 1.1.0 Az.Maintenance {Get-AzApplyUpdate, Get-AzConfigurationAssignment, Get-AzM...
Script 1.1.0 Az.ManagedServices {Get-AzManagedServicesAssignment, New-AzManagedServicesAss...
Script 1.0.2 Az.MarketplaceOrdering {Get-AzMarketplaceTerms, Set-AzMarketplaceTerms}
Script 1.0.0 Az.MarketplaceOrdering {Get-AzMarketplaceTerms, Set-AzMarketplaceTerms}
Script 1.1.1 Az.Media {Sync-AzMediaServiceStorageKey, Set-AzMediaServiceKey, Get...
Script 1.1.0 Az.Media {Sync-AzMediaServiceStorageKey, Set-AzMediaServiceKey, Get...
Script 2.1.0 Az.Monitor {Get-AzMetricDefinition, Get-AzMetric, Remove-AzLogProfile...
Script 1.2.1 Az.Monitor {Get-AzMetricDefinition, Get-AzMetric, Remove-AzLogProfile...
Script 3.4.0 Az.Network {Add-AzApplicationGatewayAuthenticationCertificate, Get-Az...
Script 1.8.1 Az.Network {Add-AzApplicationGatewayAuthenticationCertificate, Get-Az...
Script 1.1.1 Az.NotificationHubs {Get-AzNotificationHub, Get-AzNotificationHubAuthorization...
Script 1.1.0 Az.NotificationHubs {Get-AzNotificationHub, Get-AzNotificationHubAuthorization...
Script 2.3.0 Az.OperationalInsights {New-AzOperationalInsightsAzureActivityLogDataSource, New-...
Script 1.2.0 Az.OperationalInsights {New-AzOperationalInsightsAzureActivityLogDataSource, New-...
Script 1.3.1 Az.PolicyInsights {Get-AzPolicyEvent, Get-AzPolicyState, Get-AzPolicyStateSu...
Script 1.1.0 Az.PolicyInsights {Get-AzPolicyEvent, Get-AzPolicyState, Get-AzPolicyStateSu...
Script 1.1.2 Az.PowerBIEmbedded {Remove-AzPowerBIWorkspaceCollection, Get-AzPowerBIWorkspa...
Script 1.1.0 Az.PowerBIEmbedded {Remove-AzPowerBIWorkspaceCollection, Get-AzPowerBIWorkspa...
Script 1.0.3 Az.PrivateDns {Get-AzPrivateDnsZone, Remove-AzPrivateDnsZone, Set-AzPriv...
Script 2.12.1 Az.RecoveryServices {Get-AzRecoveryServicesBackupProperty, Get-AzRecoveryServi...
Script 1.4.0 Az.RecoveryServices {Get-AzRecoveryServicesBackupProperty, Get-AzRecoveryServi...
Script 1.2.1 Az.RedisCache {Remove-AzRedisCachePatchSchedule, New-AzRedisCacheSchedul...
Script 1.1.0 Az.RedisCache {Remove-AzRedisCachePatchSchedule, New-AzRedisCacheSchedul...
Script 1.0.3 Az.Relay {New-AzRelayNamespace, Get-AzRelayNamespace, Set-AzRelayNa...
Script 1.0.1 Az.Relay {New-AzRelayNamespace, Get-AzRelayNamespace, Set-AzRelayNa...
Script 2.5.1 Az.Resources {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzR...
Script 1.4.0 Az.Resources {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzR...
Script 1.4.1 Az.ServiceBus {New-AzServiceBusNamespace, Get-AzServiceBusNamespace, Set...
Script 1.1.0 Az.ServiceBus {New-AzServiceBusNamespace, Get-AzServiceBusNamespace, Set...
Script 2.2.0 Az.ServiceFabric {Add-AzServiceFabricClientCertificate, Add-AzServiceFabric...
Script 1.0.1 Az.ServiceFabric {Add-AzServiceFabricApplicationCertificate, Add-AzServiceF...
Script 1.2.0 Az.SignalR {New-AzSignalR, Get-AzSignalR, Get-AzSignalRKey, New-AzSig...
Script 1.0.2 Az.SignalR {New-AzSignalR, Get-AzSignalR, Get-AzSignalRKey, New-AzSig...
Script 2.10.0 Az.Sql {Get-AzSqlDatabaseTransparentDataEncryption, Get-AzSqlData...
Script 1.10.0 Az.Sql {Get-AzSqlDatabaseTransparentDataEncryption, Get-AzSqlData...
Script 1.1.0 Az.SqlVirtualMachine {New-AzSqlVM, Get-AzSqlVM, Update-AzSqlVM, Remove-AzSqlVM...}
Script 2.6.0 Az.Storage {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStor...
Script 1.3.0 Az.Storage {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStor...
Script 1.3.0 Az.StorageSync {Invoke-AzStorageSyncCompatibilityCheck, New-AzStorageSync...
Script 1.0.1 Az.StreamAnalytics {Get-AzStreamAnalyticsFunction, Get-AzStreamAnalyticsDefau...
Script 1.0.0 Az.StreamAnalytics {Get-AzStreamAnalyticsFunction, Get-AzStreamAnalyticsDefau...
Script 1.0.0 Az.Support {Get-AzSupportService, Get-AzSupportProblemClassification,...
Script 1.0.4 Az.TrafficManager {Add-AzTrafficManagerCustomHeaderToEndpoint, Remove-AzTraf...
Script 1.0.1 Az.TrafficManager {Add-AzTrafficManagerCustomHeaderToEndpoint, Remove-AzTraf...
Script 1.11.0 Az.Websites {Get-AzAppServicePlan, Set-AzAppServicePlan, New-AzAppServ...
Script 1.2.1 Az.Websites {Get-AzAppServicePlan, Set-AzAppServicePlan, New-AzAppServ...
Script 5.1.2 Azure {Get-AzureAutomationCertificate, Get-AzureAutomationConnec...
Script 0.5.4 Azure.AnalysisServices {Add-AzureAnalysisServicesAccount, Restart-AzureAnalysisSe...
Manifest 0.5.0 Azure.AnalysisServices {Add-AzureAnalysisServicesAccount, Restart-AzureAnalysisSe...
Script 4.6.1 Azure.Storage {Get-AzureStorageTable, New-AzureStorageTableSASToken, New...
Script 4.2.1 Azure.Storage {Get-AzureStorageTable, New-AzureStorageTableSASToken, New...
Binary 2.0.2.61 AzureAD {Add-AzureADApplicationOwner, Get-AzureADApplication, Get-...
Script 6.13.1 AzureRM
Script 5.7.0 AzureRM
Script 0.6.14 AzureRM.AnalysisServices {Resume-AzureRmAnalysisServicesServer, Suspend-AzureRmAnal...
Script 0.6.6 AzureRM.AnalysisServices {Resume-AzureRmAnalysisServicesServer, Suspend-AzureRmAnal...
Script 6.1.7 AzureRM.ApiManagement {Add-AzureRmApiManagementRegion, Get-AzureRmApiManagementS...
Script 5.1.2 AzureRM.ApiManagement {Add-AzureRmApiManagementRegion, Get-AzureRmApiManagementS...
Script 0.1.8 AzureRM.ApplicationInsights {Get-AzureRmApplicationInsights, New-AzureRmApplicationIns...
Script 0.1.3 AzureRM.ApplicationInsights {Get-AzureRmApplicationInsights, New-AzureRmApplicationIns...
Script 6.1.1 AzureRM.Automation {Get-AzureRMAutomationHybridWorkerGroup, Remove-AzureRmAut...
Script 4.3.2 AzureRM.Automation {Get-AzureRMAutomationHybridWorkerGroup, Get-AzureRmAutoma...
Script 4.0.11 AzureRM.Backup {Backup-AzureRmBackupItem, Enable-AzureRmBackupContainerRe...
Script 4.0.4 AzureRM.Backup {Backup-AzureRmBackupItem, Enable-AzureRmBackupContainerRe...
Script 4.1.5 AzureRM.Batch {Remove-AzureRmBatchAccount, Get-AzureRmBatchAccount, Get-...
Script 4.0.6 AzureRM.Batch {Remove-AzureRmBatchAccount, Get-AzureRmBatchAccount, Get-...
Script 0.14.6 AzureRM.Billing {Get-AzureRmBillingInvoice, Get-AzureRmBillingPeriod, Get-...
Script 0.14.1 AzureRM.Billing {Get-AzureRmBillingInvoice, Get-AzureRmBillingPeriod, Get-...
Script 5.0.6 AzureRM.Cdn {Get-AzureRmCdnProfile, Get-AzureRmCdnProfileSsoUrl, New-A...
Script 4.2.2 AzureRM.Cdn {Get-AzureRmCdnProfile, Get-AzureRmCdnProfileSsoUrl, New-A...
Script 0.9.12 AzureRM.CognitiveServices {Get-AzureRmCognitiveServicesAccount, Get-AzureRmCognitive...
Script 0.9.4 AzureRM.CognitiveServices {Get-AzureRmCognitiveServicesAccount, Get-AzureRmCognitive...
Script 5.9.1 AzureRM.Compute {Remove-AzureRmAvailabilitySet, Get-AzureRmAvailabilitySet...
Script 4.6.0 AzureRM.Compute {Remove-AzureRmAvailabilitySet, Get-AzureRmAvailabilitySet...
Script 0.3.7 AzureRM.Consumption {Get-AzureRmConsumptionBudget, Get-AzureRmConsumptionMarke...
Script 0.3.1 AzureRM.Consumption Get-AzureRmConsumptionUsageDetail
Script 0.2.12 AzureRM.ContainerInstance {New-AzureRmContainerGroup, Get-AzureRmContainerGroup, Rem...
Script 0.2.5 AzureRM.ContainerInstance {New-AzureRmContainerGroup, Get-AzureRmContainerGroup, Rem...
Script 1.0.10 AzureRM.ContainerRegistry {New-AzureRmContainerRegistry, Get-AzureRmContainerRegistr...
Script 1.0.4 AzureRM.ContainerRegistry {New-AzureRmContainerRegistry, Get-AzureRmContainerRegistr...
Script 5.0.3 AzureRM.DataFactories {Remove-AzureRmDataFactory, Get-AzureRmDataFactoryRun, Get...
Script 4.2.2 AzureRM.DataFactories {Remove-AzureRmDataFactory, Get-AzureRmDataFactoryRun, Get...
Script 0.5.11 AzureRM.DataFactoryV2 {Set-AzureRmDataFactoryV2, Update-AzureRmDataFactoryV2, Ge...
Script 0.5.3 AzureRM.DataFactoryV2 {Set-AzureRmDataFactoryV2, Update-AzureRmDataFactoryV2, Ge...
Script 5.1.4 AzureRM.DataLakeAnalytics {Get-AzureRmDataLakeAnalyticsDataSource, New-AzureRmDataLa...
Script 4.2.3 AzureRM.DataLakeAnalytics {Get-AzureRmDataLakeAnalyticsDataSource, New-AzureRmDataLa...
Script 6.2.1 AzureRM.DataLakeStore {Get-AzureRmDataLakeStoreTrustedIdProvider, Remove-AzureRm...
Script 5.2.0 AzureRM.DataLakeStore {Get-AzureRmDataLakeStoreTrustedIdProvider, Remove-AzureRm...
Script 4.0.9 AzureRM.DevTestLabs {Get-AzureRmDtlAllowedVMSizesPolicy, Get-AzureRmDtlAutoShu...
Script 4.0.4 AzureRM.DevTestLabs {Get-AzureRmDtlAllowedVMSizesPolicy, Get-AzureRmDtlAutoShu...
Script 5.1.0 AzureRM.Dns {Get-AzureRmDnsRecordSet, New-AzureRmDnsRecordConfig, Remo...
Script 4.1.2 AzureRM.Dns {Get-AzureRmDnsRecordSet, New-AzureRmDnsRecordConfig, Remo...
Script 0.3.7 AzureRM.EventGrid {New-AzureRmEventGridTopic, Get-AzureRmEventGridTopic, Set...
Script 0.3.2 AzureRM.EventGrid {New-AzureRmEventGridTopic, Get-AzureRmEventGridTopic, Set...
Script 0.7.0 AzureRM.EventHub {New-AzureRmEventHubNamespace, Get-AzureRmEventHubNamespac...
Script 0.6.3 AzureRM.EventHub {New-AzureRmEventHubNamespace, Get-AzureRmEventHubNamespac...
Script 4.1.8 AzureRM.HDInsight {Get-AzureRmHDInsightJob, New-AzureRmHDInsightSqoopJobDefi...
Script 4.1.2 AzureRM.HDInsight {Get-AzureRmHDInsightJob, New-AzureRmHDInsightSqoopJobDefi...
Script 5.1.5 AzureRM.Insights {Get-AzureRmMetricDefinition, Get-AzureRmMetric, Remove-Az...
Script 4.0.4 AzureRM.Insights {Get-AzureRmMetricDefinition, Get-AzureRmMetric, Remove-Az...
Script 3.1.8 AzureRM.IotHub {Add-AzureRmIotHubKey, Get-AzureRmIotHubEventHubConsumerGr...
Script 3.1.2 AzureRM.IotHub {Add-AzureRmIotHubKey, Get-AzureRmIotHubEventHubConsumerGr...
Script 5.2.1 AzureRM.KeyVault {Add-AzureKeyVaultCertificate, Update-AzureKeyVaultCertifi...
Script 4.3.0 AzureRM.KeyVault {Add-AzureKeyVaultCertificate, Set-AzureKeyVaultCertificat...
Script 4.1.4 AzureRM.LogicApp {Get-AzureRmIntegrationAccountAgreement, Get-AzureRmIntegr...
Script 4.0.3 AzureRM.LogicApp {Get-AzureRmIntegrationAccountAgreement, Get-AzureRmIntegr...
Script 0.18.5 AzureRM.MachineLearning {Move-AzureRmMlCommitmentAssociation, Get-AzureRmMlCommitm...
Script 0.17.2 AzureRM.MachineLearning {Move-AzureRmMlCommitmentAssociation, Get-AzureRmMlCommitm...
Script 0.4.8 AzureRM.MachineLearningCompute {Get-AzureRmMlOpCluster, Get-AzureRmMlOpClusterKey, Test-A...
Script 0.4.2 AzureRM.MachineLearningCompute {Get-AzureRmMlOpCluster, Get-AzureRmMlOpClusterKey, Test-A...
Script 0.2.7 AzureRM.MarketplaceOrdering {Get-AzureRmMarketplaceTerms, Set-AzureRmMarketplaceTerms}
Script 0.2.1 AzureRM.MarketplaceOrdering {Get-AzureRmMarketplaceTerms, Set-AzureRmMarketplaceTerms}
Script 0.10.4 AzureRM.Media {Sync-AzureRmMediaServiceStorageKeys, Set-AzureRmMediaServ...
Script 0.9.2 AzureRM.Media {Sync-AzureRmMediaServiceStorageKeys, Set-AzureRmMediaServ...
Script 6.11.1 AzureRM.Network {Add-AzureRmApplicationGatewayAuthenticationCertificate, G...
Script 5.4.2 AzureRM.Network {Add-AzureRmApplicationGatewayAuthenticationCertificate, G...
Script 5.0.3 AzureRM.NotificationHubs {Get-AzureRmNotificationHub, Get-AzureRmNotificationHubAut...
Script 4.1.1 AzureRM.NotificationHubs {Get-AzureRmNotificationHub, Get-AzureRmNotificationHubAut...
Script 5.0.6 AzureRM.OperationalInsights {New-AzureRmOperationalInsightsAzureActivityLogDataSource,...
Script 4.3.2 AzureRM.OperationalInsights {New-AzureRmOperationalInsightsAzureActivityLogDataSource,...
Script 1.1.0 AzureRM.PolicyInsights {Get-AzureRmPolicyEvent, Get-AzureRmPolicyState, Get-Azure...
Script 4.1.10 AzureRM.PowerBIEmbedded {Remove-AzureRmPowerBIWorkspaceCollection, Get-AzureRmPowe...
Script 4.1.4 AzureRM.PowerBIEmbedded {Remove-AzureRmPowerBIWorkspaceCollection, Get-AzureRmPowe...
Script 5.8.2 AzureRM.Profile {Disable-AzureRmDataCollection, Disable-AzureRmContextAuto...
Script 4.6.0 AzureRM.Profile {Disable-AzureRmDataCollection, Disable-AzureRmContextAuto...
Script 4.1.9 AzureRM.RecoveryServices {Get-AzureRmRecoveryServicesBackupProperty, Get-AzureRmRec...
Script 4.1.2 AzureRM.RecoveryServices {Get-AzureRmRecoveryServicesBackupProperty, Get-AzureRmRec...
Script 4.5.2 AzureRM.RecoveryServices.Backup {Backup-AzureRmRecoveryServicesBackupItem, Get-AzureRmReco...
Script 4.1.2 AzureRM.RecoveryServices.Backup {Backup-AzureRmRecoveryServicesBackupItem, Get-AzureRmReco...
Script 0.2.12 AzureRM.RecoveryServices.SiteRec... {Edit-AzureRmRecoveryServicesAsrRecoveryPlan, Get-AzureRmR...
Script 0.2.4 AzureRM.RecoveryServices.SiteRec... {Edit-AzureRmRecoveryServicesAsrRecoveryPlan, Get-AzureRmR...
Script 5.1.0 AzureRM.RedisCache {Remove-AzureRmRedisCachePatchSchedule, New-AzureRmRedisCa...
Script 4.1.2 AzureRM.RedisCache {Remove-AzureRmRedisCachePatchSchedule, New-AzureRmRedisCa...
Script 0.3.12 AzureRM.Relay {New-AzureRmRelayNamespace, Get-AzureRmRelayNamespace, Set...
Script 0.3.3 AzureRM.Relay {New-AzureRmRelayNamespace, Get-AzureRmRelayNamespace, Set...
Script 6.7.3 AzureRM.Resources {Get-AzureRmProviderOperation, Remove-AzureRmRoleAssignmen...
Script 5.5.2 AzureRM.Resources {Get-AzureRmProviderOperation, Remove-AzureRmRoleAssignmen...
Script 0.16.10 AzureRM.Scheduler {Disable-AzureRmSchedulerJobCollection, Enable-AzureRmSche...
Script 0.16.3 AzureRM.Scheduler {Disable-AzureRmSchedulerJobCollection, Enable-AzureRmSche...
Script 4.1.2 AzureRM.ServerManagement {Invoke-AzureRmServerManagementPowerShellCommand, Get-Azur...
Script 0.6.13 AzureRM.ServiceBus {New-AzureRmServiceBusNamespace, Get-AzureRmServiceBusName...
Script 0.6.4 AzureRM.ServiceBus {New-AzureRmServiceBusNamespace, Get-AzureRmServiceBusName...
Script 0.3.15 AzureRM.ServiceFabric {Add-AzureRmServiceFabricApplicationCertificate, Add-Azure...
Script 0.3.4 AzureRM.ServiceFabric {Add-AzureRmServiceFabricApplicationCertificate, Add-Azure...
Script 1.0.0 AzureRM.SignalR {New-AzureRmSignalR, Get-AzureRmSignalR, Get-AzureRmSignal...
Script 5.0.6 AzureRM.SiteRecovery {Get-AzureRmSiteRecoveryFabric, New-AzureRmSiteRecoveryFab...
Script 4.12.1 AzureRM.Sql {Get-AzureRmSqlDatabaseTransparentDataEncryption, Get-Azur...
Script 4.4.0 AzureRM.Sql {Get-AzureRmSqlDatabaseTransparentDataEncryption, Get-Azur...
Script 5.2.0 AzureRM.Storage {Get-AzureRmStorageAccount, Get-AzureRmStorageAccountKey, ...
Script 4.2.3 AzureRM.Storage {Get-AzureRmStorageAccount, Get-AzureRmStorageAccountKey, ...
Script 4.0.10 AzureRM.StreamAnalytics {Get-AzureRmStreamAnalyticsFunction, Get-AzureRmStreamAnal...
Script 4.0.4 AzureRM.StreamAnalytics {Get-AzureRmStreamAnalyticsFunction, Get-AzureRmStreamAnal...
Script 4.0.5 AzureRM.Tags {Remove-AzureRmTag, Get-AzureRmTag, New-AzureRmTag}
Script 4.0.1 AzureRM.Tags {Remove-AzureRmTag, Get-AzureRmTag, New-AzureRmTag}
Script 4.1.3 AzureRM.TrafficManager {Add-AzureRmTrafficManagerCustomHeaderToEndpoint, Remove-A...
Script 4.0.3 AzureRM.TrafficManager {Disable-AzureRmTrafficManagerEndpoint, Enable-AzureRmTraf...
Script 4.0.5 AzureRM.UsageAggregates Get-UsageAggregates
Script 4.0.2 AzureRM.UsageAggregates Get-UsageAggregates
Script 5.2.0 AzureRM.Websites {Get-AzureRmAppServicePlan, Set-AzureRmAppServicePlan, New...
Script 4.2.2 AzureRM.Websites {Get-AzureRmAppServicePlan, Set-AzureRmAppServicePlan, New...
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-Packa...
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, Remov...
Directory: C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 1.0.0.0 ActiveDirectory {Add-ADCentralAccessPolicyMember, Add-ADComputerServiceAcc...
Manifest 1.0.0.0 AppBackgroundTask {Disable-AppBackgroundTaskDiagnosticLog, Enable-AppBackgro...
Manifest 2.0.0.0 AppLocker {Get-AppLockerFileInformation, Get-AppLockerPolicy, New-Ap...
Manifest 1.0.0.0 AppvClient {Add-AppvClientConnectionGroup, Add-AppvClientPackage, Add...
Manifest 2.0.1.0 Appx {Add-AppxPackage, Get-AppxPackage, Get-AppxPackageManifest...
Script 1.0.0.0 AssignedAccess {Clear-AssignedAccess, Get-AssignedAccess, Set-AssignedAcc...
Manifest 1.0 BestPractices {Get-BpaModel, Get-BpaResult, Invoke-BpaModel, Set-BpaResult}
Manifest 1.0.0.0 BitLocker {Unlock-BitLocker, Suspend-BitLocker, Resume-BitLocker, Re...
Manifest 2.0.0.0 BitsTransfer {Add-BitsFile, Complete-BitsTransfer, Get-BitsTransfer, Re...
Manifest 1.0.0.0 BranchCache {Add-BCDataCacheExtension, Clear-BCCache, Disable-BC, Disa...
Manifest 1.0.0.0 CimCmdlets {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance,...
Binary 2.0.0.0 ClusterAwareUpdating {Get-CauPlugin, Register-CauPlugin, Unregister-CauPlugin, ...
Manifest 1.0 ConfigCI {Get-SystemDriver, New-CIPolicyRule, New-CIPolicy, Get-CIP...
Manifest 1.0 ConfigDefender {Get-MpPreference, Set-MpPreference, Add-MpPreference, Rem...
Manifest 1.0 Defender {Get-MpPreference, Set-MpPreference, Add-MpPreference, Rem...
Manifest 1.0.2.0 DeliveryOptimization {Delete-DeliveryOptimizationCache, Set-DeliveryOptimizatio...
Manifest 1.0 DFSN {Get-DfsnRoot, Remove-DfsnRoot, Set-DfsnRoot, New-DfsnRoot...
Binary 2.0.0.0 DFSR {New-DfsReplicationGroup, Get-DfsReplicationGroup, Set-Dfs...
Manifest 2.0.0.0 DhcpServer {Add-DhcpServerInDC, Add-DhcpServerv4Class, Add-DhcpServer...
Manifest 1.0.0.0 DirectAccessClientComponents {Disable-DAManualEntryPointSelection, Enable-DAManualEntry...
Script 3.0 Dism {Add-AppxProvisionedPackage, Add-WindowsDriver, Add-Window...
Manifest 1.0.0.0 DnsClient {Resolve-DnsName, Clear-DnsClientCache, Get-DnsClient, Get...
Manifest 2.0.0.0 DnsServer {Add-DnsServerConditionalForwarderZone, Add-DnsServerDirec...
Manifest 1.0.0.0 EventTracingManagement {Start-EtwTraceSession, New-EtwTraceSession, Get-EtwTraceS...
Manifest 2.0.0.0 FailoverClusters {Add-ClusterCheckpoint, Add-ClusterDisk, Add-ClusterFileSe...
Manifest 1.0.0.0 GroupPolicy {Backup-GPO, Block-GPInheritance, Copy-GPO, Get-GPInherita...
Manifest 1.0.0.0 HgsClient {Get-HgsAttestationBaselinePolicy, Get-HgsClientConfigurat...
Manifest 1.0.0.0 HgsDiagnostics {New-HgsTraceTarget, Get-HgsTrace, Get-HgsTraceFileData, T...
Manifest 1.0.0.1 HostNetworkingService {Remove-HnsNamespace, Remove-HnsEndpoint, Get-HnsEndpoint,...
Binary 2.0.0.0 Hyper-V {Add-VMAssignableDevice, Add-VMDvdDrive, Add-VMFibreChanne...
Binary 1.1 Hyper-V {Add-VMDvdDrive, Add-VMFibreChannelHba, Add-VMHardDiskDriv...
Manifest 2.0.0.0 International {Get-WinDefaultInputMethodOverride, Set-WinDefaultInputMet...
Manifest 2.0.0.0 IpamServer {Get-IpamDhcpConfigurationEvent, Remove-IpamDhcpConfigurat...
Manifest 1.0.0.0 iSCSI {Get-IscsiTargetPortal, New-IscsiTargetPortal, Remove-Iscs...
Manifest 2.0.0.0 IscsiTarget {Add-ClusteriSCSITargetServerRole, Add-IscsiVirtualDiskTar...
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-KdsC...
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...
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-WSManCredS...
Manifest 1.0 MMAgent {Disable-MMAgent, Enable-MMAgent, Set-MMAgent, Get-MMAgent...
Manifest 1.0.0.0 MsDtc {New-DtcDiagnosticTransaction, Complete-DtcDiagnosticTrans...
Manifest 2.0.0.0 NetAdapter {Disable-NetAdapter, Disable-NetAdapterBinding, Disable-Ne...
Manifest 1.0.0.0 NetConnection {Get-NetConnectionProfile, Set-NetConnectionProfile}
Manifest 1.0.0.0 NetDiagnostics Get-NetView
Manifest 1.0.0.0 NetEventPacketCapture {New-NetEventSession, Remove-NetEventSession, Get-NetEvent...
Manifest 2.0.0.0 NetLbfo {Add-NetLbfoTeamMember, Add-NetLbfoTeamNic, Get-NetLbfoTea...
Manifest 1.0 NetLldpAgent {Enable-NetLldpAgent, Disable-NetLldpAgent, Get-NetLldpAgent}
Manifest 1.0.0.0 NetNat {Get-NetNat, Get-NetNatExternalAddress, Get-NetNatStaticMa...
Manifest 2.0.0.0 NetQos {Get-NetQosPolicy, Set-NetQosPolicy, Remove-NetQosPolicy, ...
Manifest 2.0.0.0 NetSecurity {Get-DAPolicyChange, New-NetIPsecAuthProposal, New-NetIPse...
Manifest 1.0.0.0 NetSwitchTeam {New-NetSwitchTeam, Remove-NetSwitchTeam, Get-NetSwitchTea...
Manifest 1.0.0.0 NetTCPIP {Get-NetIPAddress, Get-NetIPInterface, Get-NetIPv4Protocol...
Manifest 1.0.0.0 NetworkConnectivityStatus {Get-DAConnectionStatus, Get-NCSIPolicyConfiguration, Rese...
Manifest 1.0.0.0 NetworkController {Add-NetworkControllerNode, Disable-NetworkControllerNode,...
Manifest 1.0.0.0 NetworkControllerDiagnostics {Get-NetworkControllerDeploymentInfo, Get-NetworkControlle...
Manifest 2.0.0.0 NetworkLoadBalancingClusters {Add-NlbClusterNode, Add-NlbClusterNodeDip, Add-NlbCluster...
Manifest 1.0.0.0 NetworkSwitchManager {Disable-NetworkSwitchEthernetPort, Enable-NetworkSwitchEt...
Manifest 1.0.0.0 NetworkTransition {Add-NetIPHttpsCertBinding, Disable-NetDnsTransitionConfig...
Manifest 1.0 NFS {Get-NfsMappedIdentity, Get-NfsNetgroup, Install-NfsMappin...
Manifest 1.0.0.0 PcsvDevice {Get-PcsvDevice, Start-PcsvDevice, Stop-PcsvDevice, Restar...
Binary 1.0.0.0 PersistentMemory {Get-PmemDisk, Get-PmemPhysicalDevice, Get-PmemUnusedRegio...
Manifest 1.0.0.0 PKI {Add-CertificateEnrollmentPolicyServer, Export-Certificate...
Manifest 1.0.0.0 PnpDevice {Get-PnpDevice, Get-PnpDeviceProperty, Enable-PnpDevice, D...
Manifest 1.1 PrintManagement {Add-Printer, Add-PrinterDriver, Add-PrinterPort, Get-Prin...
Binary 1.0.11 ProcessMitigations {Get-ProcessMitigation, Set-ProcessMitigation, ConvertTo-P...
Script 3.0 Provisioning {Install-ProvisioningPackage, Export-ProvisioningPackage, ...
Manifest 1.1 PSDesiredStateConfiguration {Set-DscLocalConfigurationManager, Start-DscConfiguration,...
Script 1.0.0.0 PSDiagnostics {Disable-PSTrace, Disable-PSWSManCombinedTrace, Disable-WS...
Binary 1.1.0.0 PSScheduledJob {New-JobTrigger, Add-JobTrigger, Remove-JobTrigger, Get-Jo...
Manifest 2.0.0.0 PSWorkflow {New-PSWorkflowExecutionOption, New-PSWorkflowSession, nwsn}
Manifest 1.0.0.0 PSWorkflowUtility Invoke-AsWorkflow
Manifest 3.0.0.0 RemoteAccess {Add-DAAppServer, Add-DAClient, Add-DAClientDnsConfigurati...
Manifest 2.0.0.0 RemoteDesktop {Get-RDCertificate, Set-RDCertificate, New-RDCertificate, ...
Manifest 1.0.0.0 ScheduledTasks {Get-ScheduledTask, Set-ScheduledTask, Register-ScheduledT...
Manifest 2.0.0.0 SecureBoot {Confirm-SecureBootUEFI, Set-SecureBootUEFI, Get-SecureBoo...
Script 2.0.0.0 ServerManager {Get-WindowsFeature, Install-WindowsFeature, Uninstall-Win...
Cim 1.0.0.0 ServerManagerTasks {Get-SMCounterSample, Get-SMPerformanceCollector, Start-SM...
Manifest 1.0.0.0 ShieldedVMDataFile {Import-ShieldingDataFile, New-ShieldingDataFile, New-Volu...
Manifest 1.0.0.0 ShieldedVMTemplate {Protect-TemplateDisk, Initialize-VMShieldingHelperVHD}
Manifest 2.0.0.0 SmbShare {Get-SmbShare, Remove-SmbShare, Set-SmbShare, Block-SmbSha...
Manifest 2.0.0.0 SmbWitness {Get-SmbWitnessClient, Move-SmbWitnessClient, gsmbw, msmbw...
Manifest 1.0.0.0 StartLayout {Export-StartLayout, Import-StartLayout, Export-StartLayou...
Manifest 2.0.0.0 Storage {Add-InitiatorIdToMaskingSet, Add-PartitionAccessPath, Add...
Manifest 1.0.0.0 StorageBusCache {Clear-StorageBusDisk, Disable-StorageBusCache, Disable-St...
Manifest 1.0.0.0 StorageQoS {Get-StorageQoSPolicy, Get-StorageQoSPolicyStore, Set-Stor...
Manifest 1.0 StorageReplica {Test-SRTopology, New-SRGroup, Remove-SRGroup, Set-SRGroup...
Manifest 2.0.0.0 TLS {New-TlsSessionTicketKey, Enable-TlsSessionTicketKey, Disa...
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-Uev...
Manifest 2.0.0.0 UpdateServices {Add-WsusComputer, Approve-WsusUpdate, Deny-WsusUpdate, Ge...
Manifest 2.0.0.0 VpnClient {Add-VpnConnection, Set-VpnConnection, Remove-VpnConnectio...
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-WindowsDeveloperL...
Script 1.0 WindowsErrorReporting {Enable-WindowsErrorReporting, Disable-WindowsErrorReporti...
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-WULastSca...
Directory: C:\Program Files\Microsoft Message Analyzer\PowerShell
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 1.1.0.0 PEF {Invoke-PefCustomAction, Save-PefDataCollection, Add-PefMe...
Directory: C:\Program Files (x86)\Microsoft Azure Information Protection\Powershell
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Binary 2.6.111.0 AzureInformationProtection {Clear-AIPAuthentication, Get-AIPFileStatus, New-AIPCustom...
Directory: C:\Program Files\Intel\Wired Networking
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Binary 25.1.1.1 IntelNetCmdlets {Get-IntelNetAdapter, Get-IntelNetAdapterSetting, Set-Inte...
Debug output
PS C:\WINDOWS\system32> $DebugPreference='Continue'
PS C:\WINDOWS\system32> $subscriptionId = "c5930ba8-5b04-4664-9267-72bcef385673"
PS C:\WINDOWS\system32> Set-AzContext -SubscriptionId $subscriptionId
DEBUG: 12:09:01 PM - SetAzureRMContextCommand begin processing with ParameterSet 'Subscription'.
DEBUG: 12:09:01 PM - using account id '[email protected]'...
DEBUG: 12:09:01 PM - Autosave setting from startup session: 'CurrentUser'
DEBUG: 12:09:01 PM - No autosave setting detected in environment variable 'AzContextAutoSave'.
DEBUG: 12:09:01 PM - Using Autosave scope 'CurrentUser'
DEBUG: [Common.Authentication]: Authenticating using configuration values: Domain:
'10091114-575b-4b26-87b7-7abfd209e8d2', 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/10091114-575b-4b26-87b7-7abfd209e8d2/', CorrelationId:
'00000000-0000-0000-0000-000000000000', ValidateAuthority: 'True'
DEBUG: [Common.Authentication]: Acquiring token using AdalConfiguration with Domain:
'10091114-575b-4b26-87b7-7abfd209e8d2', AdEndpoint: 'https://login.microsoftonline.com/', ClientId:
'1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirectUri: urn:ietf:wg:oauth:2.0:oob
DEBUG: [ADAL]: Information: 2020-10-12T19:09:01.4609929Z: a44f2ac9-2a09-4723-910f-0c68be1c04e8 - 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-10-12T19:09:01.4609929Z: a44f2ac9-2a09-4723-910f-0c68be1c04e8 - 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-10-12T19:09:01.4609929Z: a44f2ac9-2a09-4723-910f-0c68be1c04e8 - LoggerBase.cs: ===
Token Acquisition started:
CacheType: null
Authentication Target: User
, Authority Host: login.microsoftonline.com
DEBUG: [ADAL]: Information: 2020-10-12T19:09:01.4609929Z: a44f2ac9-2a09-4723-910f-0c68be1c04e8 - LoggerBase.cs: ===
Token Acquisition started:
Authority: https://login.microsoftonline.com/10091114-575b-4b26-87b7-7abfd209e8d2/
Resource: https://management.core.windows.net/
ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
CacheType: null
Authentication Target: User
DEBUG: [ADAL]: Verbose: 2020-10-12T19:09:01.4609929Z: a44f2ac9-2a09-4723-910f-0c68be1c04e8 - LoggerBase.cs: Loading
from cache.
DEBUG: [ADAL]: Verbose: 2020-10-12T19:09:01.4609929Z: a44f2ac9-2a09-4723-910f-0c68be1c04e8 - LoggerBase.cs: Loading
from cache.
DEBUG: [ADAL]: Information: 2020-10-12T19:09:01.4629910Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs:
Deserialized 4 items to token cache.
DEBUG: [ADAL]: Verbose: 2020-10-12T19:09:01.4629910Z: a44f2ac9-2a09-4723-910f-0c68be1c04e8 - LoggerBase.cs: Looking up
cache for a token...
DEBUG: [ADAL]: Verbose: 2020-10-12T19:09:01.4629910Z: a44f2ac9-2a09-4723-910f-0c68be1c04e8 - LoggerBase.cs: Looking up
cache for a token...
DEBUG: [ADAL]: Information: 2020-10-12T19:09:01.4629910Z: a44f2ac9-2a09-4723-910f-0c68be1c04e8 - LoggerBase.cs: An item
matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2020-10-12T19:09:01.4629910Z: a44f2ac9-2a09-4723-910f-0c68be1c04e8 - LoggerBase.cs: An item
matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2020-10-12T19:09:01.4629910Z: a44f2ac9-2a09-4723-910f-0c68be1c04e8 - LoggerBase.cs:
34.07785015 minutes left until token in cache expires
DEBUG: [ADAL]: Information: 2020-10-12T19:09:01.4629910Z: a44f2ac9-2a09-4723-910f-0c68be1c04e8 - LoggerBase.cs:
34.07785015 minutes left until token in cache expires
DEBUG: [ADAL]: Information: 2020-10-12T19:09:01.4629910Z: a44f2ac9-2a09-4723-910f-0c68be1c04e8 - LoggerBase.cs: A
matching item (access token or refresh token or both) was found in the cache
DEBUG: [ADAL]: Information: 2020-10-12T19:09:01.4629910Z: a44f2ac9-2a09-4723-910f-0c68be1c04e8 - LoggerBase.cs: A
matching item (access token or refresh token or both) was found in the cache
DEBUG: [ADAL]: Information: 2020-10-12T19:09:01.4629910Z: a44f2ac9-2a09-4723-910f-0c68be1c04e8 - LoggerBase.cs: ===
Token Acquisition finished successfully. An access token was returned: Expiration Time: 10/12/2020 7:43:06 PM +00:00
DEBUG: [ADAL]: Information: 2020-10-12T19:09:01.4629910Z: a44f2ac9-2a09-4723-910f-0c68be1c04e8 - LoggerBase.cs: ===
Token Acquisition finished successfully. An access token was returned: Expiration Time: 10/12/2020 7:43:06 PM
+00:00Access Token Hash: jEo588NGcTkivfGIzv0oSESOAeSd0n1VLVHUf9UPovI=
User id: 47d4e9dc-3a62-4ff3-a8da-d85d87d5265c
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
GET
Absolute Uri:
https://management.azure.com/tenants?api-version=2019-06-01
Headers:
x-ms-client-request-id : 34ddec5d-82f1-4de0-9f9f-27685fbbeda0
accept-language : en-US
Body:
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
OK
Headers:
Pragma : no-cache
x-ms-ratelimit-remaining-tenant-reads: 11999
x-ms-request-id : eef482cb-50ab-4c02-8aa9-efa8c077228f
x-ms-correlation-request-id : eef482cb-50ab-4c02-8aa9-efa8c077228f
x-ms-routing-request-id : WESTUS:20201012T190901Z:eef482cb-50ab-4c02-8aa9-efa8c077228f
Strict-Transport-Security : max-age=31536000; includeSubDomains
X-Content-Type-Options : nosniff
Cache-Control : no-cache
Date : Mon, 12 Oct 2020 19:09:00 GMT
Body:
{
"value": [
{
"id": "/tenants/10091114-575b-4b26-87b7-7abfd209e8d2",
"tenantId": "10091114-575b-4b26-87b7-7abfd209e8d2",
"countryCode": "US",
"displayName": "Default Directory",
"domains": [
"jesseknguyenoutlook.onmicrosoft.com"
],
"tenantCategory": "Home"
},
{
"id": "/tenants/eeb9d7a3-24cc-46e0-8c9f-1825a74f9801",
"tenantId": "eeb9d7a3-24cc-46e0-8c9f-1825a74f9801",
"countryCode": "US",
"displayName": "TestAzureADTenant",
"domains": [
"TestAzureADTenant6730.onmicrosoft.com"
],
"tenantCategory": "Home"
}
]
}
DEBUG: [Common.Authentication]: Authenticating using configuration values: Domain:
'10091114-575b-4b26-87b7-7abfd209e8d2', 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/10091114-575b-4b26-87b7-7abfd209e8d2/', CorrelationId:
'00000000-0000-0000-0000-000000000000', ValidateAuthority: 'True'
DEBUG: [Common.Authentication]: Acquiring token using AdalConfiguration with Domain:
'10091114-575b-4b26-87b7-7abfd209e8d2', AdEndpoint: 'https://login.microsoftonline.com/', ClientId:
'1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirectUri: urn:ietf:wg:oauth:2.0:oob
DEBUG: [ADAL]: Information: 2020-10-12T19:09:01.7819886Z: 00771a2a-1e22-4464-a559-8f6a2fc6e0ee - 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-10-12T19:09:01.7819886Z: 00771a2a-1e22-4464-a559-8f6a2fc6e0ee - 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-10-12T19:09:01.7819886Z: 00771a2a-1e22-4464-a559-8f6a2fc6e0ee - LoggerBase.cs: ===
Token Acquisition started:
CacheType: null
Authentication Target: User
, Authority Host: login.microsoftonline.com
DEBUG: [ADAL]: Information: 2020-10-12T19:09:01.7829864Z: 00771a2a-1e22-4464-a559-8f6a2fc6e0ee - LoggerBase.cs: ===
Token Acquisition started:
Authority: https://login.microsoftonline.com/10091114-575b-4b26-87b7-7abfd209e8d2/
Resource: https://management.core.windows.net/
ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
CacheType: null
Authentication Target: User
DEBUG: [ADAL]: Verbose: 2020-10-12T19:09:01.7829864Z: 00771a2a-1e22-4464-a559-8f6a2fc6e0ee - LoggerBase.cs: Loading
from cache.
DEBUG: [ADAL]: Verbose: 2020-10-12T19:09:01.7829864Z: 00771a2a-1e22-4464-a559-8f6a2fc6e0ee - LoggerBase.cs: Loading
from cache.
DEBUG: [ADAL]: Information: 2020-10-12T19:09:01.7839852Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs:
Deserialized 4 items to token cache.
DEBUG: [ADAL]: Verbose: 2020-10-12T19:09:01.7839852Z: 00771a2a-1e22-4464-a559-8f6a2fc6e0ee - LoggerBase.cs: Looking up
cache for a token...
DEBUG: [ADAL]: Verbose: 2020-10-12T19:09:01.7839852Z: 00771a2a-1e22-4464-a559-8f6a2fc6e0ee - LoggerBase.cs: Looking up
cache for a token...
DEBUG: [ADAL]: Information: 2020-10-12T19:09:01.7839852Z: 00771a2a-1e22-4464-a559-8f6a2fc6e0ee - LoggerBase.cs: An item
matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2020-10-12T19:09:01.7839852Z: 00771a2a-1e22-4464-a559-8f6a2fc6e0ee - LoggerBase.cs: An item
matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2020-10-12T19:09:01.7839852Z: 00771a2a-1e22-4464-a559-8f6a2fc6e0ee - LoggerBase.cs:
34.0725002466667 minutes left until token in cache expires
DEBUG: [ADAL]: Information: 2020-10-12T19:09:01.7839852Z: 00771a2a-1e22-4464-a559-8f6a2fc6e0ee - LoggerBase.cs:
34.0725002466667 minutes left until token in cache expires
DEBUG: [ADAL]: Information: 2020-10-12T19:09:01.7839852Z: 00771a2a-1e22-4464-a559-8f6a2fc6e0ee - LoggerBase.cs: A
matching item (access token or refresh token or both) was found in the cache
DEBUG: [ADAL]: Information: 2020-10-12T19:09:01.7839852Z: 00771a2a-1e22-4464-a559-8f6a2fc6e0ee - LoggerBase.cs: A
matching item (access token or refresh token or both) was found in the cache
DEBUG: [ADAL]: Information: 2020-10-12T19:09:01.7839852Z: 00771a2a-1e22-4464-a559-8f6a2fc6e0ee - LoggerBase.cs: ===
Token Acquisition finished successfully. An access token was returned: Expiration Time: 10/12/2020 7:43:06 PM +00:00
DEBUG: [ADAL]: Information: 2020-10-12T19:09:01.7839852Z: 00771a2a-1e22-4464-a559-8f6a2fc6e0ee - LoggerBase.cs: ===
Token Acquisition finished successfully. An access token was returned: Expiration Time: 10/12/2020 7:43:06 PM
+00:00Access Token Hash: jEo588NGcTkivfGIzv0oSESOAeSd0n1VLVHUf9UPovI=
User id: 47d4e9dc-3a62-4ff3-a8da-d85d87d5265c
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
GET
Absolute Uri:
https://management.azure.com/subscriptions?api-version=2019-06-01
Headers:
x-ms-client-request-id : 09433ca0-a325-496d-b46c-6bd1f80e53ca
accept-language : en-US
Body:
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
OK
Headers:
Pragma : no-cache
x-ms-ratelimit-remaining-tenant-reads: 11999
x-ms-request-id : 76f41d9f-e662-4a1f-95c7-ebe0c8a022c7
x-ms-correlation-request-id : 76f41d9f-e662-4a1f-95c7-ebe0c8a022c7
x-ms-routing-request-id : WESTUS:20201012T190902Z:76f41d9f-e662-4a1f-95c7-ebe0c8a022c7
Strict-Transport-Security : max-age=31536000; includeSubDomains
X-Content-Type-Options : nosniff
Cache-Control : no-cache
Date : Mon, 12 Oct 2020 19:09:01 GMT
Body:
{
"value": [
{
"id": "/subscriptions/dd8006c5-525d-4da7-b053-d819dfb6faf3",
"authorizationSource": "Legacy",
"managedByTenants": [],
"subscriptionId": "dd8006c5-525d-4da7-b053-d819dfb6faf3",
"tenantId": "10091114-575b-4b26-87b7-7abfd209e8d2",
"displayName": "150 - Visual Studio Enterprise",
"state": "Enabled",
"subscriptionPolicies": {
"locationPlacementId": "Public_2014-09-01",
"quotaId": "MSDN_2014-09-01",
"spendingLimit": "On"
}
},
{
"id": "/subscriptions/c5930ba8-5b04-4664-9267-72bcef385673",
"authorizationSource": "Legacy",
"managedByTenants": [],
"subscriptionId": "c5930ba8-5b04-4664-9267-72bcef385673",
"tenantId": "10091114-575b-4b26-87b7-7abfd209e8d2",
"displayName": "50 - Visual Studio Professional with MSDN",
"state": "Enabled",
"subscriptionPolicies": {
"locationPlacementId": "Public_2014-09-01",
"quotaId": "MSDN_2014-09-01",
"spendingLimit": "On"
}
},
{
"id": "/subscriptions/db078f28-0fc7-4057-a69d-71576b708e78",
"authorizationSource": "Legacy",
"managedByTenants": [],
"subscriptionId": "db078f28-0fc7-4057-a69d-71576b708e78",
"tenantId": "10091114-575b-4b26-87b7-7abfd209e8d2",
"displayName": "Visual Studio Enterprise",
"state": "Enabled",
"subscriptionPolicies": {
"locationPlacementId": "Public_2014-09-01",
"quotaId": "MSDN_2014-09-01",
"spendingLimit": "On"
}
},
{
"id": "/subscriptions/bb0514b2-f509-498e-9fa8-9cf1aab48644",
"authorizationSource": "Legacy",
"managedByTenants": [],
"subscriptionId": "bb0514b2-f509-498e-9fa8-9cf1aab48644",
"tenantId": "10091114-575b-4b26-87b7-7abfd209e8d2",
"displayName": "Visual Studio Enterprise",
"state": "Enabled",
"subscriptionPolicies": {
"locationPlacementId": "Public_2014-09-01",
"quotaId": "MSDN_2014-09-01",
"spendingLimit": "On"
}
}
],
"count": {
"type": "Total",
"value": 4
}
}
DEBUG: [Common.Authentication]: Authenticating using configuration values: Domain:
'eeb9d7a3-24cc-46e0-8c9f-1825a74f9801', 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/eeb9d7a3-24cc-46e0-8c9f-1825a74f9801/', CorrelationId:
'00000000-0000-0000-0000-000000000000', ValidateAuthority: 'True'
DEBUG: [Common.Authentication]: Acquiring token using AdalConfiguration with Domain:
'eeb9d7a3-24cc-46e0-8c9f-1825a74f9801', AdEndpoint: 'https://login.microsoftonline.com/', ClientId:
'1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirectUri: urn:ietf:wg:oauth:2.0:oob
DEBUG: [ADAL]: Information: 2020-10-12T19:09:02.4379641Z: 716bc9ee-5807-402e-975c-f84cca832609 - 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-10-12T19:09:02.4379641Z: 716bc9ee-5807-402e-975c-f84cca832609 - 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-10-12T19:09:02.4379641Z: 716bc9ee-5807-402e-975c-f84cca832609 - LoggerBase.cs: ===
Token Acquisition started:
CacheType: null
Authentication Target: User
, Authority Host: login.microsoftonline.com
DEBUG: [ADAL]: Information: 2020-10-12T19:09:02.4379641Z: 716bc9ee-5807-402e-975c-f84cca832609 - LoggerBase.cs: ===
Token Acquisition started:
Authority: https://login.microsoftonline.com/eeb9d7a3-24cc-46e0-8c9f-1825a74f9801/
Resource: https://management.core.windows.net/
ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
CacheType: null
Authentication Target: User
DEBUG: [ADAL]: Verbose: 2020-10-12T19:09:02.4379641Z: 716bc9ee-5807-402e-975c-f84cca832609 - LoggerBase.cs: Loading
from cache.
DEBUG: [ADAL]: Verbose: 2020-10-12T19:09:02.4379641Z: 716bc9ee-5807-402e-975c-f84cca832609 - LoggerBase.cs: Loading
from cache.
DEBUG: [ADAL]: Information: 2020-10-12T19:09:02.4389663Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs:
Deserialized 4 items to token cache.
DEBUG: [ADAL]: Verbose: 2020-10-12T19:09:02.4389663Z: 716bc9ee-5807-402e-975c-f84cca832609 - LoggerBase.cs: Looking up
cache for a token...
DEBUG: [ADAL]: Verbose: 2020-10-12T19:09:02.4389663Z: 716bc9ee-5807-402e-975c-f84cca832609 - LoggerBase.cs: Looking up
cache for a token...
DEBUG: [ADAL]: Information: 2020-10-12T19:09:02.4389663Z: 716bc9ee-5807-402e-975c-f84cca832609 - LoggerBase.cs: An item
matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2020-10-12T19:09:02.4389663Z: 716bc9ee-5807-402e-975c-f84cca832609 - LoggerBase.cs: An item
matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2020-10-12T19:09:02.4389663Z: 716bc9ee-5807-402e-975c-f84cca832609 - LoggerBase.cs: An
expired or near expiry token was found in the cache
DEBUG: [ADAL]: Information: 2020-10-12T19:09:02.4389663Z: 716bc9ee-5807-402e-975c-f84cca832609 - LoggerBase.cs: An
expired or near expiry token was found in the cache
DEBUG: [ADAL]: Information: 2020-10-12T19:09:02.4389663Z: 716bc9ee-5807-402e-975c-f84cca832609 - LoggerBase.cs: A
matching item (access token or refresh token or both) was found in the cache
DEBUG: [ADAL]: Information: 2020-10-12T19:09:02.4389663Z: 716bc9ee-5807-402e-975c-f84cca832609 - LoggerBase.cs: A
matching item (access token or refresh token or both) was found in the cache
DEBUG: [ADAL]: Verbose: 2020-10-12T19:09:02.4389663Z: 716bc9ee-5807-402e-975c-f84cca832609 - LoggerBase.cs: Refreshing
access token...
DEBUG: [ADAL]: Verbose: 2020-10-12T19:09:02.4389663Z: 716bc9ee-5807-402e-975c-f84cca832609 - LoggerBase.cs: Refreshing
access token...
DEBUG: [ADAL]: Verbose: 2020-10-12T19:09:02.7479625Z: 716bc9ee-5807-402e-975c-f84cca832609 - LoggerBase.cs: Storing
token in the cache...
DEBUG: [ADAL]: Verbose: 2020-10-12T19:09:02.7479625Z: 716bc9ee-5807-402e-975c-f84cca832609 - LoggerBase.cs: Storing
token in the cache...
DEBUG: [ADAL]: Verbose: 2020-10-12T19:09:02.7479625Z: 716bc9ee-5807-402e-975c-f84cca832609 - LoggerBase.cs: An item was
stored in the cache
DEBUG: [ADAL]: Verbose: 2020-10-12T19:09:02.7479625Z: 716bc9ee-5807-402e-975c-f84cca832609 - LoggerBase.cs: An item was
stored in the cache
DEBUG: [ADAL]: Information: 2020-10-12T19:09:02.7479625Z: 716bc9ee-5807-402e-975c-f84cca832609 - LoggerBase.cs: ===
Token Acquisition finished successfully. An access token was returned: Expiration Time: 10/12/2020 8:09:01 PM +00:00
DEBUG: [ADAL]: Information: 2020-10-12T19:09:02.7479625Z: 716bc9ee-5807-402e-975c-f84cca832609 - LoggerBase.cs: ===
Token Acquisition finished successfully. An access token was returned: Expiration Time: 10/12/2020 8:09:01 PM
+00:00Access Token Hash: BUc/yNj1fuBk+wzUJSVfgtuuUTx1IHQW7WRpUTg3hL0=
User id: cb9f917d-51c1-41b8-ab56-cdcca589a92f
DEBUG: [ADAL]: Information: 2020-10-12T19:09:02.7479625Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs:
Serializing token cache with 4 items.
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
GET
Absolute Uri:
https://management.azure.com/subscriptions?api-version=2019-06-01
Headers:
x-ms-client-request-id : 4d6e3ccb-bcc7-4e53-a563-1d3ee84d1c8c
accept-language : en-US
Body:
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
OK
Headers:
Pragma : no-cache
x-ms-ratelimit-remaining-tenant-reads: 11999
x-ms-request-id : 4cf491b0-4f47-4cb8-9ced-a48ce415f975
x-ms-correlation-request-id : 4cf491b0-4f47-4cb8-9ced-a48ce415f975
x-ms-routing-request-id : WESTUS:20201012T190902Z:4cf491b0-4f47-4cb8-9ced-a48ce415f975
Strict-Transport-Security : max-age=31536000; includeSubDomains
X-Content-Type-Options : nosniff
Cache-Control : no-cache
Date : Mon, 12 Oct 2020 19:09:01 GMT
Body:
{
"value": [],
"count": {
"type": "Total",
"value": 0
}
}
Name Account SubscriptionName Environment TenantId
---- ------- ---------------- ----------- --------
50 - Visual Studio Professional with ... Jesse.K.Nguyen@o... 50 - Visual Stud... AzureCloud 10091114-575b-4...
DEBUG: AzureQoSEvent: CommandName - Set-AzContext; IsSuccess - True; Duration - 00:00:01.7601546;
DEBUG: Finish sending metric.
DEBUG: 12:09:03 PM - SetAzureRMContextCommand end processing.
PS C:\WINDOWS\system32>
PS C:\WINDOWS\system32> $location = 'Global'
PS C:\WINDOWS\system32> $alertName = "Test Storage Account Administrative Operations"
PS C:\WINDOWS\system32> $resourceGroupName = 'AzureSentinelRG-01'
PS C:\WINDOWS\system32> $scope = "/subscriptions/c5930ba8-5b04-4664-9267-72bcef385673/"
PS C:\WINDOWS\system32> $condition1 = New-AzActivityLogAlertCondition -Field 'Category' -Equal 'Administrative'
DEBUG: 12:09:03 PM - NewAzureRmActivityLogAlertConditionCommand begin processing with ParameterSet
'__AllParameterSets'.
DEBUG: 12:09:03 PM - using account id '[email protected]'...
DEBUG: AzureQoSEvent: CommandName - New-AzActivityLogAlertCondition; IsSuccess - True; Duration - 00:00:00.0037380;
DEBUG: Finish sending metric.
DEBUG: 12:09:04 PM - NewAzureRmActivityLogAlertConditionCommand end processing.
PS C:\WINDOWS\system32> $condition2 = New-AzActivityLogAlertCondition -Field 'Signal name' -Equal 'All Administrative operations'
DEBUG: 12:09:04 PM - NewAzureRmActivityLogAlertConditionCommand begin processing with ParameterSet
'__AllParameterSets'.
DEBUG: 12:09:04 PM - using account id '[email protected]'...
DEBUG: AzureQoSEvent: CommandName - New-AzActivityLogAlertCondition; IsSuccess - True; Duration - 00:00:00.0048612;
DEBUG: Finish sending metric.
DEBUG: 12:09:04 PM - NewAzureRmActivityLogAlertConditionCommand end processing.
PS C:\WINDOWS\system32> $alertDescription = "Test description"
PS C:\WINDOWS\system32> $actionGroup = Get-AzActionGroup -Name "ActionGroup-01" -ResourceGroupName $resourceGroupName
DEBUG: 12:09:04 PM - GetAzureRmActionGroupCommand begin processing with ParameterSet 'ByName'.
DEBUG: 12:09:04 PM - using account id '[email protected]'...
WARNING: 12:09:04 PM - *** The namespace for all the model classes will change from
Microsoft.Azure.Management.Monitor.Management.Models to Microsoft.Azure.Management.Monitor.Models in future releases.
WARNING: 12:09:04 PM - *** The namespace for output classes will be uniform for all classes in future releases to make
it independent of modifications in the model classes.
DEBUG: [Common.Authentication]: Authenticating using Account: '[email protected]', environment: 'AzureCloud',
tenant: '10091114-575b-4b26-87b7-7abfd209e8d2'
DEBUG: [Common.Authentication]: Authenticating using configuration values: Domain:
'10091114-575b-4b26-87b7-7abfd209e8d2', 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/10091114-575b-4b26-87b7-7abfd209e8d2/', CorrelationId:
'00000000-0000-0000-0000-000000000000', ValidateAuthority: 'True'
DEBUG: [Common.Authentication]: Acquiring token using AdalConfiguration with Domain:
'10091114-575b-4b26-87b7-7abfd209e8d2', AdEndpoint: 'https://login.microsoftonline.com/', ClientId:
'1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirectUri: urn:ietf:wg:oauth:2.0:oob
DEBUG: [ADAL]: Information: 2020-10-12T19:09:04.7549378Z: f7af6213-ef96-4c54-9f85-2d2b4640f53d - 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-10-12T19:09:04.7549378Z: f7af6213-ef96-4c54-9f85-2d2b4640f53d - 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-10-12T19:09:04.7549378Z: f7af6213-ef96-4c54-9f85-2d2b4640f53d - LoggerBase.cs: ===
Token Acquisition started:
CacheType: null
Authentication Target: User
, Authority Host: login.microsoftonline.com
DEBUG: [ADAL]: Information: 2020-10-12T19:09:04.7549378Z: f7af6213-ef96-4c54-9f85-2d2b4640f53d - LoggerBase.cs: ===
Token Acquisition started:
Authority: https://login.microsoftonline.com/10091114-575b-4b26-87b7-7abfd209e8d2/
Resource: https://management.core.windows.net/
ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
CacheType: null
Authentication Target: User
DEBUG: [ADAL]: Verbose: 2020-10-12T19:09:04.7549378Z: f7af6213-ef96-4c54-9f85-2d2b4640f53d - LoggerBase.cs: Loading
from cache.
DEBUG: [ADAL]: Verbose: 2020-10-12T19:09:04.7549378Z: f7af6213-ef96-4c54-9f85-2d2b4640f53d - LoggerBase.cs: Loading
from cache.
DEBUG: [ADAL]: Information: 2020-10-12T19:09:04.7559375Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs:
Deserialized 4 items to token cache.
DEBUG: [ADAL]: Verbose: 2020-10-12T19:09:04.7559375Z: f7af6213-ef96-4c54-9f85-2d2b4640f53d - LoggerBase.cs: Looking up
cache for a token...
DEBUG: [ADAL]: Verbose: 2020-10-12T19:09:04.7559375Z: f7af6213-ef96-4c54-9f85-2d2b4640f53d - LoggerBase.cs: Looking up
cache for a token...
DEBUG: [ADAL]: Information: 2020-10-12T19:09:04.7559375Z: f7af6213-ef96-4c54-9f85-2d2b4640f53d - LoggerBase.cs: An item
matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2020-10-12T19:09:04.7559375Z: f7af6213-ef96-4c54-9f85-2d2b4640f53d - LoggerBase.cs: An item
matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2020-10-12T19:09:04.7559375Z: f7af6213-ef96-4c54-9f85-2d2b4640f53d - LoggerBase.cs:
34.0229677083333 minutes left until token in cache expires
DEBUG: [ADAL]: Information: 2020-10-12T19:09:04.7559375Z: f7af6213-ef96-4c54-9f85-2d2b4640f53d - LoggerBase.cs:
34.0229677083333 minutes left until token in cache expires
DEBUG: [ADAL]: Information: 2020-10-12T19:09:04.7559375Z: f7af6213-ef96-4c54-9f85-2d2b4640f53d - LoggerBase.cs: A
matching item (access token or refresh token or both) was found in the cache
DEBUG: [ADAL]: Information: 2020-10-12T19:09:04.7559375Z: f7af6213-ef96-4c54-9f85-2d2b4640f53d - LoggerBase.cs: A
matching item (access token or refresh token or both) was found in the cache
DEBUG: [ADAL]: Information: 2020-10-12T19:09:04.7559375Z: f7af6213-ef96-4c54-9f85-2d2b4640f53d - LoggerBase.cs: ===
Token Acquisition finished successfully. An access token was returned: Expiration Time: 10/12/2020 7:43:06 PM +00:00
DEBUG: [ADAL]: Information: 2020-10-12T19:09:04.7559375Z: f7af6213-ef96-4c54-9f85-2d2b4640f53d - LoggerBase.cs: ===
Token Acquisition finished successfully. An access token was returned: Expiration Time: 10/12/2020 7:43:06 PM
+00:00Access Token Hash: jEo588NGcTkivfGIzv0oSESOAeSd0n1VLVHUf9UPovI=
User id: 47d4e9dc-3a62-4ff3-a8da-d85d87d5265c
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '10/12/2020 19:43:06 +00:00',
MultipleResource? 'True', Tenant: '10091114-575b-4b26-87b7-7abfd209e8d2', UserId: '[email protected]'
DEBUG: [Common.Authentication]: User info for token DisplayId: '[email protected]', Name: Jesse Nguyen,
IdProvider: 'live.com', Uid: '47d4e9dc-3a62-4ff3-a8da-d85d87d5265c'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '10/12/2020 19:43:06 +00:00' Comparing to
'10/12/2020 19:09:04 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:34:01.3770636'
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
GET
Absolute Uri:
https://management.azure.com/subscriptions/c5930ba8-5b04-4664-9267-72bcef385673/resourceGroups/AzureSentinelRG-01/provi
ders/microsoft.insights/actionGroups/ActionGroup-01?api-version=2019-06-01
Headers:
x-ms-client-request-id : a00ec99c-14eb-4f0e-b895-99a203e05ff0
accept-language : en-US
Body:
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
OK
Headers:
Pragma : no-cache
Strict-Transport-Security : max-age=31536000; includeSubDomains
x-ms-request-id : 024f3300-124a-43d6-9ab8-047364f1fc33
x-ms-ratelimit-remaining-subscription-reads: 11999
x-ms-correlation-request-id : 74a6de6d-3391-470c-85e6-70e6c3d298b5
x-ms-routing-request-id : WESTUS:20201012T190904Z:74a6de6d-3391-470c-85e6-70e6c3d298b5
X-Content-Type-Options : nosniff
Cache-Control : no-cache
Date : Mon, 12 Oct 2020 19:09:03 GMT
Server : Microsoft-IIS/10.0
Body:
{
"id":
"/subscriptions/c5930ba8-5b04-4664-9267-72bcef385673/resourceGroups/AzureSentinelRG-01/providers/microsoft.insights/act
ionGroups/ActionGroup-01",
"type": "Microsoft.Insights/ActionGroups",
"name": "ActionGroup-01",
"location": "Global",
"kind": null,
"tags": {},
"properties": {
"groupShortName": "AG-01",
"enabled": true,
"emailReceivers": [
{
"name": "email and sms_-EmailAction-",
"emailAddress": "[email protected]",
"status": "Enabled",
"useCommonAlertSchema": false
}
],
"smsReceivers": [
{
"name": "email and sms_-SMSAction-",
"countryCode": "1",
"phoneNumber": "3608783805",
"status": "Enabled"
}
],
"webhookReceivers": [],
"itsmReceivers": [],
"azureAppPushReceivers": [],
"automationRunbookReceivers": [],
"voiceReceivers": [],
"logicAppReceivers": [],
"azureFunctionReceivers": [],
"armRoleReceivers": []
},
"identity": null
}
DEBUG: AzureQoSEvent: CommandName - Get-AzActionGroup; IsSuccess - True; Duration - 00:00:00.3167993;
DEBUG: Finish sending metric.
DEBUG: 12:09:05 PM - GetAzureRmActionGroupCommand end processing.
PS C:\WINDOWS\system32>
PS C:\WINDOWS\system32> #Old object name
PS C:\WINDOWS\system32> $actionGroupObject1 = New-Object Microsoft.Azure.Management.Monitor.Models.ActivityLogAlertActionGroup
PS C:\WINDOWS\system32>
PS C:\WINDOWS\system32> #New object name
PS C:\WINDOWS\system32> $actionGroupObject2 = New-Object Microsoft.Azure.Management.Monitor.Management.Models.ActivityLogAlertActionGroup
PS C:\WINDOWS\system32> #$actionGroupObject1 = New-Object Microsoft.Azure.Management.Monitor.Models.ActivityLogAlertActionGroup $actionGroup.Id
PS C:\WINDOWS\system32> #this command is broken: $actionGroupObject2 = New-Object Microsoft.Azure.Management.Monitor.Management.Models.ActivityLogAlertActionGroup $actionGroup.Id
PS C:\WINDOWS\system32>
PS C:\WINDOWS\system32> $actionGroupObject1.ActionGroupId = $actionGroup.Id
PS C:\WINDOWS\system32> $actionGroupObject2.ActionGroupId = $actionGroup.Id
PS C:\WINDOWS\system32>
PS C:\WINDOWS\system32> Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName -Scope $scope -Action $actionGroupObject1 -Condition $condition1, $condition2 -Description $alertDescription
DEBUG: 12:11:01 PM - SetAzureRmActivityLogAlertCommand begin processing with ParameterSet 'SetByNameAndResourceGroup'.
DEBUG: 12:11:01 PM - using account id '[email protected]'...
WARNING: 12:11:01 PM - *** The namespace for all the model classes will change from
Microsoft.Azure.Management.Monitor.Management.Models to Microsoft.Azure.Management.Monitor.Models in future releases.
WARNING: 12:11:01 PM - *** The namespace for output classes will be uniform for all classes in future releases to make
it independent of modifications in the model classes.
DEBUG: [Common.Authentication]: Authenticating using Account: '[email protected]', environment: 'AzureCloud',
tenant: '10091114-575b-4b26-87b7-7abfd209e8d2'
DEBUG: [Common.Authentication]: Authenticating using configuration values: Domain:
'10091114-575b-4b26-87b7-7abfd209e8d2', 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/10091114-575b-4b26-87b7-7abfd209e8d2/', CorrelationId:
'00000000-0000-0000-0000-000000000000', ValidateAuthority: 'True'
DEBUG: [Common.Authentication]: Acquiring token using AdalConfiguration with Domain:
'10091114-575b-4b26-87b7-7abfd209e8d2', AdEndpoint: 'https://login.microsoftonline.com/', ClientId:
'1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirectUri: urn:ietf:wg:oauth:2.0:oob
DEBUG: [ADAL]: Information: 2020-10-12T19:11:01.8705186Z: 1841388a-0960-4c39-a8a9-4fdf5172b6a8 - 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-10-12T19:11:01.8705186Z: 1841388a-0960-4c39-a8a9-4fdf5172b6a8 - 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-10-12T19:11:01.8705186Z: 1841388a-0960-4c39-a8a9-4fdf5172b6a8 - LoggerBase.cs: ===
Token Acquisition started:
CacheType: null
Authentication Target: User
, Authority Host: login.microsoftonline.com
DEBUG: [ADAL]: Information: 2020-10-12T19:11:01.8705186Z: 1841388a-0960-4c39-a8a9-4fdf5172b6a8 - LoggerBase.cs: ===
Token Acquisition started:
Authority: https://login.microsoftonline.com/10091114-575b-4b26-87b7-7abfd209e8d2/
Resource: https://management.core.windows.net/
ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
CacheType: null
Authentication Target: User
DEBUG: [ADAL]: Verbose: 2020-10-12T19:11:01.8705186Z: 1841388a-0960-4c39-a8a9-4fdf5172b6a8 - LoggerBase.cs: Loading
from cache.
DEBUG: [ADAL]: Verbose: 2020-10-12T19:11:01.8705186Z: 1841388a-0960-4c39-a8a9-4fdf5172b6a8 - LoggerBase.cs: Loading
from cache.
DEBUG: [ADAL]: Information: 2020-10-12T19:11:01.8715193Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs:
Deserialized 4 items to token cache.
DEBUG: [ADAL]: Verbose: 2020-10-12T19:11:01.8715193Z: 1841388a-0960-4c39-a8a9-4fdf5172b6a8 - LoggerBase.cs: Looking up
cache for a token...
DEBUG: [ADAL]: Verbose: 2020-10-12T19:11:01.8715193Z: 1841388a-0960-4c39-a8a9-4fdf5172b6a8 - LoggerBase.cs: Looking up
cache for a token...
DEBUG: [ADAL]: Information: 2020-10-12T19:11:01.8715193Z: 1841388a-0960-4c39-a8a9-4fdf5172b6a8 - LoggerBase.cs: An item
matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2020-10-12T19:11:01.8715193Z: 1841388a-0960-4c39-a8a9-4fdf5172b6a8 - LoggerBase.cs: An item
matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2020-10-12T19:11:01.8715193Z: 1841388a-0960-4c39-a8a9-4fdf5172b6a8 - LoggerBase.cs:
32.071041345 minutes left until token in cache expires
DEBUG: [ADAL]: Information: 2020-10-12T19:11:01.8715193Z: 1841388a-0960-4c39-a8a9-4fdf5172b6a8 - LoggerBase.cs:
32.071041345 minutes left until token in cache expires
DEBUG: [ADAL]: Information: 2020-10-12T19:11:01.8715193Z: 1841388a-0960-4c39-a8a9-4fdf5172b6a8 - LoggerBase.cs: A
matching item (access token or refresh token or both) was found in the cache
DEBUG: [ADAL]: Information: 2020-10-12T19:11:01.8715193Z: 1841388a-0960-4c39-a8a9-4fdf5172b6a8 - LoggerBase.cs: A
matching item (access token or refresh token or both) was found in the cache
DEBUG: [ADAL]: Information: 2020-10-12T19:11:01.8715193Z: 1841388a-0960-4c39-a8a9-4fdf5172b6a8 - LoggerBase.cs: ===
Token Acquisition finished successfully. An access token was returned: Expiration Time: 10/12/2020 7:43:06 PM +00:00
DEBUG: [ADAL]: Information: 2020-10-12T19:11:01.8715193Z: 1841388a-0960-4c39-a8a9-4fdf5172b6a8 - LoggerBase.cs: ===
Token Acquisition finished successfully. An access token was returned: Expiration Time: 10/12/2020 7:43:06 PM
+00:00Access Token Hash: jEo588NGcTkivfGIzv0oSESOAeSd0n1VLVHUf9UPovI=
User id: 47d4e9dc-3a62-4ff3-a8da-d85d87d5265c
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '10/12/2020 19:43:06 +00:00',
MultipleResource? 'True', Tenant: '10091114-575b-4b26-87b7-7abfd209e8d2', UserId: '[email protected]'
DEBUG: [Common.Authentication]: User info for token DisplayId: '[email protected]', Name: Jesse Nguyen,
IdProvider: 'live.com', Uid: '47d4e9dc-3a62-4ff3-a8da-d85d87d5265c'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '10/12/2020 19:43:06 +00:00' Comparing to
'10/12/2020 19:11:01 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:32:04.2564805'
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
PUT
Absolute Uri:
https://management.azure.com/subscriptions/c5930ba8-5b04-4664-9267-72bcef385673/resourceGroups/AzureSentinelRG-01/provi
ders/microsoft.insights/activityLogAlerts/Test Storage Account Administrative Operations?api-version=2017-04-01
Headers:
x-ms-client-request-id : ace472bd-5dde-4772-b9db-4434b52c45c2
accept-language : en-US
Body:
{
"properties": {
"scopes": [
"/subscriptions/c5930ba8-5b04-4664-9267-72bcef385673/"
],
"enabled": true,
"condition": {
"allOf": [
{
"field": "Category",
"equals": "Administrative"
},
{
"field": "Signal name",
"equals": "All Administrative operations"
}
]
},
"actions": {
"actionGroups": [
{
"actionGroupId":
"/subscriptions/c5930ba8-5b04-4664-9267-72bcef385673/resourceGroups/AzureSentinelRG-01/providers/microsoft.insights/act
ionGroups/ActionGroup-01"
}
]
},
"description": "Test description"
},
"location": "Global"
}
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
BadRequest
Headers:
Pragma : no-cache
x-ms-request-id : westus_958f13fadad943ee8daabda7ffd48efc_637381266627249927
x-ms-ratelimit-remaining-subscription-writes: 1199
x-ms-correlation-request-id : 4fa4149a-7432-47a1-9276-2fd3c061b350
x-ms-routing-request-id : WESTUS:20201012T191102Z:4fa4149a-7432-47a1-9276-2fd3c061b350
Strict-Transport-Security : max-age=31536000; includeSubDomains
X-Content-Type-Options : nosniff
Cache-Control : no-cache
Date : Mon, 12 Oct 2020 19:11:02 GMT
Server : Microsoft-IIS/10.0
Body:
{
"code": "UnsupportedCondition",
"message": "Alert Rule must have exactly one category."
}
Set-AzActivityLogAlert : Exception type: ErrorResponseException, Message:
Microsoft.Azure.Management.Monitor.Models.ErrorResponseException: Operation returned an invalid status code
'BadRequest'
at
Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperations.<CreateOrUpdateWithHttpMessagesAsync>d__5.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 System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.<CreateOrUpdateAsync>d__1.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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at
Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.CreateOrUpdate(IActivityLogAlertsOperations
operations, String resourceGroupName, String activityLogAlertName, ActivityLogAlertResource activityLogAlert)
at Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand.ProcessRecordInternal()
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet(), Code: Null, Status code:Null, Reason
phrase: Null
At line:1 char:1
+ Set-AzActivityLogAlert -Location $location -Name $alertName -Resource ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Set-AzActivityLogAlert], PSInvalidOperationException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand
DEBUG: AzureQoSEvent: CommandName - Set-AzActivityLogAlert; IsSuccess - False; Duration - 00:00:01.4526720;; Exception
- System.Management.Automation.PSInvalidOperationException: Exception type: ErrorResponseException, Message:
Microsoft.Azure.Management.Monitor.Models.ErrorResponseException: Operation returned an invalid status code
'BadRequest'
at
Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperations.<CreateOrUpdateWithHttpMessagesAsync>d__5.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 System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.<CreateOrUpdateAsync>d__1.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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at
Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.CreateOrUpdate(IActivityLogAlertsOperations
operations, String resourceGroupName, String activityLogAlertName, ActivityLogAlertResource activityLogAlert)
at Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand.ProcessRecordInternal()
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet(), Code: Null, Status code:Null, Reason phrase:
Null ---> Microsoft.Azure.Management.Monitor.Models.ErrorResponseException: Operation returned an invalid status code
'BadRequest'
at
Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperations.<CreateOrUpdateWithHttpMessagesAsync>d__5.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 System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.<CreateOrUpdateAsync>d__1.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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at
Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.CreateOrUpdate(IActivityLogAlertsOperations
operations, String resourceGroupName, String activityLogAlertName, ActivityLogAlertResource activityLogAlert)
at Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand.ProcessRecordInternal()
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet()
--- End of inner exception stack trace ---
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord();
DEBUG: Finish sending metric.
DEBUG: 12:11:04 PM - SetAzureRmActivityLogAlertCommand end processing.
Error output
PS C:\WINDOWS\system32> Resolve-AzError
DEBUG: 12:23:13 PM - ResolveError begin processing with ParameterSet 'AnyErrorParameterSet'.
DEBUG: 12:23:13 PM - using account id '[email protected]'...
WARNING: Upcoming breaking changes in the cmdlet 'Resolve-AzError' :
The `Resolve-Error` alias will be removed in a future release. Please change any scripts that use this alias to use
`Resolve-AzError` instead.
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: 112
Message : Exception type: ErrorResponseException, Message:
Microsoft.Azure.Management.Monitor.Models.ErrorResponseException: Operation returned an invalid
status code 'BadRequest'
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperations.<CreateOrUpdateWithHttpMessagesAs
ync>d__5.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 System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.<CreateOrUpdateAsync>d_
_1.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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.CreateOrUpdate(IActivit
yLogAlertsOperations operations, String resourceGroupName, String activityLogAlertName,
ActivityLogAlertResource activityLogAlert)
at Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand.ProcessReco
rdInternal()
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet(), Code: Null, Status
code:Null, Reason phrase: Null
StackTrace : at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Exception : System.Management.Automation.PSInvalidOperationException
InvocationInfo : {Set-AzActivityLogAlert}
Line : Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName
-Scope $scope -Action $actionGroupObject1 -Condition $condition1, $condition2 -Description
$alertDescription
Position : At line:1 char:1
+ Set-AzActivityLogAlert -Location $location -Name $alertName -Resource ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 112
Message : Operation returned an invalid status code 'BadRequest'
StackTrace : at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperations.<CreateOrUpdateWithHttpMessagesAs
ync>d__5.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 System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.<CreateOrUpdateAsync>d_
_1.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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.CreateOrUpdate(IActivit
yLogAlertsOperations operations, String resourceGroupName, String activityLogAlertName,
ActivityLogAlertResource activityLogAlert)
at Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand.ProcessReco
rdInternal()
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet()
Exception : Microsoft.Azure.Management.Monitor.Models.ErrorResponseException
InvocationInfo : {Set-AzActivityLogAlert}
Line : Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName
-Scope $scope -Action $actionGroupObject1 -Condition $condition1, $condition2 -Description
$alertDescription
Position : At line:1 char:1
+ Set-AzActivityLogAlert -Location $location -Name $alertName -Resource ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 112
HistoryId: 89
Message : Exception type: ErrorResponseException, Message:
Microsoft.Azure.Management.Monitor.Models.ErrorResponseException: Operation returned an invalid
status code 'BadRequest'
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperations.<CreateOrUpdateWithHttpMessagesAs
ync>d__5.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 System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.<CreateOrUpdateAsync>d_
_1.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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.CreateOrUpdate(IActivit
yLogAlertsOperations operations, String resourceGroupName, String activityLogAlertName,
ActivityLogAlertResource activityLogAlert)
at Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand.ProcessReco
rdInternal()
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet(), Code: Null, Status
code:Null, Reason phrase: Null
StackTrace : at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Exception : System.Management.Automation.PSInvalidOperationException
InvocationInfo : {Set-AzActivityLogAlert}
Line : Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName
-Scope $scope -Action $actionGroup2 -Condition $condition1, $condition2 -Description $alertDescription
Position : At line:1 char:1
+ Set-AzActivityLogAlert -Location $location -Name $alertName -Resource ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 89
Message : Operation returned an invalid status code 'BadRequest'
StackTrace : at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperations.<CreateOrUpdateWithHttpMessagesAs
ync>d__5.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 System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.<CreateOrUpdateAsync>d_
_1.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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.CreateOrUpdate(IActivit
yLogAlertsOperations operations, String resourceGroupName, String activityLogAlertName,
ActivityLogAlertResource activityLogAlert)
at Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand.ProcessReco
rdInternal()
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet()
Exception : Microsoft.Azure.Management.Monitor.Models.ErrorResponseException
InvocationInfo : {Set-AzActivityLogAlert}
Line : Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName
-Scope $scope -Action $actionGroup2 -Condition $condition1, $condition2 -Description $alertDescription
Position : At line:1 char:1
+ Set-AzActivityLogAlert -Location $location -Name $alertName -Resource ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 89
HistoryId: 80
Message : Cannot find an overload for "ActivityLogAlertActionGroup" and the argument count: "2".
StackTrace : at System.Management.Automation.Adapter.GetBestMethodAndArguments(String methodName,
MethodInformation[] methods, PSMethodInvocationConstraints invocationConstraints, Object[] arguments,
Object[]& newArguments)
at System.Management.Automation.DotNetAdapter.ConstructorInvokeDotNet(Type type, ConstructorInfo[]
constructors, Object[] arguments)
at Microsoft.PowerShell.Commands.NewObjectCommand.CallConstructor(Type type, ConstructorInfo[]
constructors, Object[] args)
Exception : System.Management.Automation.MethodException
InvocationInfo : {New-Object}
Line : New-Object Microsoft.Azure.Management.Monitor.Management.Models.ActivityLogAlertActionGroup
$actionGroup.Id,""
Position : At line:1 char:1
+ New-Object Microsoft.Azure.Management.Monitor.Management.Models.Activ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 80
HistoryId: 79
Message : Cannot find an overload for "ActivityLogAlertActionGroup" and the argument count: "1".
StackTrace : at System.Management.Automation.Adapter.GetBestMethodAndArguments(String methodName,
MethodInformation[] methods, PSMethodInvocationConstraints invocationConstraints, Object[] arguments,
Object[]& newArguments)
at System.Management.Automation.DotNetAdapter.ConstructorInvokeDotNet(Type type, ConstructorInfo[]
constructors, Object[] arguments)
at Microsoft.PowerShell.Commands.NewObjectCommand.CallConstructor(Type type, ConstructorInfo[]
constructors, Object[] args)
Exception : System.Management.Automation.MethodException
InvocationInfo : {New-Object}
Line : Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName
-Scope $scope -Action (New-Object
Microsoft.Azure.Management.Monitor.Management.Models.ActivityLogAlertActionGroup $actiongroup.Id)
-Condition $condition1, $condition2 -Description $alertDescription
Position : At line:1 char:122
+ ... pe -Action (New-Object Microsoft.Azure.Management.Monitor.Management. ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 79
HistoryId: 78
Message : Exception type: ErrorResponseException, Message:
Microsoft.Azure.Management.Monitor.Models.ErrorResponseException: Operation returned an invalid
status code 'BadRequest'
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperations.<CreateOrUpdateWithHttpMessagesAs
ync>d__5.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 System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.<CreateOrUpdateAsync>d_
_1.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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.CreateOrUpdate(IActivit
yLogAlertsOperations operations, String resourceGroupName, String activityLogAlertName,
ActivityLogAlertResource activityLogAlert)
at Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand.ProcessReco
rdInternal()
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet(), Code: Null, Status
code:Null, Reason phrase: Null
StackTrace : at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Exception : System.Management.Automation.PSInvalidOperationException
InvocationInfo : {Set-AzActivityLogAlert}
Line : Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName
-Scope $scope -Action (New-Object
Microsoft.Azure.Management.Monitor.Models.ActivityLogAlertActionGroup $actiongroup.Id) -Condition
$condition1, $condition2 -Description $alertDescription
Position : At line:1 char:1
+ Set-AzActivityLogAlert -Location $location -Name $alertName -Resource ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 78
Message : Operation returned an invalid status code 'BadRequest'
StackTrace : at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperations.<CreateOrUpdateWithHttpMessagesAs
ync>d__5.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 System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.<CreateOrUpdateAsync>d_
_1.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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.CreateOrUpdate(IActivit
yLogAlertsOperations operations, String resourceGroupName, String activityLogAlertName,
ActivityLogAlertResource activityLogAlert)
at Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand.ProcessReco
rdInternal()
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet()
Exception : Microsoft.Azure.Management.Monitor.Models.ErrorResponseException
InvocationInfo : {Set-AzActivityLogAlert}
Line : Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName
-Scope $scope -Action (New-Object
Microsoft.Azure.Management.Monitor.Models.ActivityLogAlertActionGroup $actiongroup.Id) -Condition
$condition1, $condition2 -Description $alertDescription
Position : At line:1 char:1
+ Set-AzActivityLogAlert -Location $location -Name $alertName -Resource ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 78
HistoryId: 77
Message : Cannot find an overload for "ActivityLogAlertActionGroup" and the argument count: "1".
StackTrace : at System.Management.Automation.Adapter.GetBestMethodAndArguments(String methodName,
MethodInformation[] methods, PSMethodInvocationConstraints invocationConstraints, Object[] arguments,
Object[]& newArguments)
at System.Management.Automation.DotNetAdapter.ConstructorInvokeDotNet(Type type, ConstructorInfo[]
constructors, Object[] arguments)
at Microsoft.PowerShell.Commands.NewObjectCommand.CallConstructor(Type type, ConstructorInfo[]
constructors, Object[] args)
Exception : System.Management.Automation.MethodException
InvocationInfo : {New-Object}
Line : New-Object Microsoft.Azure.Management.Monitor.Management.Models.ActivityLogAlertActionGroup
$actionGroup.id
Position : At line:1 char:1
+ New-Object Microsoft.Azure.Management.Monitor.Management.Models.Activ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 77
HistoryId: 75
Message : Cannot find an overload for "ActivityLogAlertActionGroup" and the argument count: "1".
StackTrace : at System.Management.Automation.Adapter.GetBestMethodAndArguments(String methodName,
MethodInformation[] methods, PSMethodInvocationConstraints invocationConstraints, Object[] arguments,
Object[]& newArguments)
at System.Management.Automation.DotNetAdapter.ConstructorInvokeDotNet(Type type, ConstructorInfo[]
constructors, Object[] arguments)
at Microsoft.PowerShell.Commands.NewObjectCommand.CallConstructor(Type type, ConstructorInfo[]
constructors, Object[] args)
Exception : System.Management.Automation.MethodException
InvocationInfo : {New-Object}
Line : New-Object Microsoft.Azure.Management.Monitor.Management.Models.ActivityLogAlertActionGroup
$actionGroup
Position : At line:1 char:1
+ New-Object Microsoft.Azure.Management.Monitor.Management.Models.Activ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 75
HistoryId: 69
Message : Exception type: ErrorResponseException, Message:
Microsoft.Azure.Management.Monitor.Models.ErrorResponseException: Operation returned an invalid
status code 'BadRequest'
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperations.<CreateOrUpdateWithHttpMessagesAs
ync>d__5.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 System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.<CreateOrUpdateAsync>d_
_1.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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.CreateOrUpdate(IActivit
yLogAlertsOperations operations, String resourceGroupName, String activityLogAlertName,
ActivityLogAlertResource activityLogAlert)
at Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand.ProcessReco
rdInternal()
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet(), Code: Null, Status
code:Null, Reason phrase: Null
StackTrace : at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Exception : System.Management.Automation.PSInvalidOperationException
InvocationInfo : {Set-AzActivityLogAlert}
Line : Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName
-Scope $scope -Action $actionGroupObject2 -Condition $condition1, $condition2 -Description
$alertDescription
Position : At line:1 char:1
+ Set-AzActivityLogAlert -Location $location -Name $alertName -Resource ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 69
Message : Operation returned an invalid status code 'BadRequest'
StackTrace : at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperations.<CreateOrUpdateWithHttpMessagesAs
ync>d__5.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 System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.<CreateOrUpdateAsync>d_
_1.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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.CreateOrUpdate(IActivit
yLogAlertsOperations operations, String resourceGroupName, String activityLogAlertName,
ActivityLogAlertResource activityLogAlert)
at Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand.ProcessReco
rdInternal()
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet()
Exception : Microsoft.Azure.Management.Monitor.Models.ErrorResponseException
InvocationInfo : {Set-AzActivityLogAlert}
Line : Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName
-Scope $scope -Action $actionGroupObject2 -Condition $condition1, $condition2 -Description
$alertDescription
Position : At line:1 char:1
+ Set-AzActivityLogAlert -Location $location -Name $alertName -Resource ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 69
HistoryId: 68
Message : Exception type: ErrorResponseException, Message:
Microsoft.Azure.Management.Monitor.Models.ErrorResponseException: Operation returned an invalid
status code 'BadRequest'
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperations.<CreateOrUpdateWithHttpMessagesAs
ync>d__5.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 System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.<CreateOrUpdateAsync>d_
_1.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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.CreateOrUpdate(IActivit
yLogAlertsOperations operations, String resourceGroupName, String activityLogAlertName,
ActivityLogAlertResource activityLogAlert)
at Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand.ProcessReco
rdInternal()
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet(), Code: Null, Status
code:Null, Reason phrase: Null
StackTrace : at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Exception : System.Management.Automation.PSInvalidOperationException
InvocationInfo : {Set-AzActivityLogAlert}
Line : Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName
-Scope $scope -Action $actionGroupObject1 -Condition $condition1, $condition2 -Description
$alertDescription
Position : At line:1 char:1
+ Set-AzActivityLogAlert -Location $location -Name $alertName -Resource ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 68
Message : Operation returned an invalid status code 'BadRequest'
StackTrace : at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperations.<CreateOrUpdateWithHttpMessagesAs
ync>d__5.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 System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.<CreateOrUpdateAsync>d_
_1.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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.CreateOrUpdate(IActivit
yLogAlertsOperations operations, String resourceGroupName, String activityLogAlertName,
ActivityLogAlertResource activityLogAlert)
at Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand.ProcessReco
rdInternal()
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet()
Exception : Microsoft.Azure.Management.Monitor.Models.ErrorResponseException
InvocationInfo : {Set-AzActivityLogAlert}
Line : Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName
-Scope $scope -Action $actionGroupObject1 -Condition $condition1, $condition2 -Description
$alertDescription
Position : At line:1 char:1
+ Set-AzActivityLogAlert -Location $location -Name $alertName -Resource ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 68
HistoryId: 63
Message : Cannot find an overload for "ActivityLogAlertActionGroup" and the argument count: "1".
StackTrace : at System.Management.Automation.Adapter.GetBestMethodAndArguments(String methodName,
MethodInformation[] methods, PSMethodInvocationConstraints invocationConstraints, Object[] arguments,
Object[]& newArguments)
at System.Management.Automation.DotNetAdapter.ConstructorInvokeDotNet(Type type, ConstructorInfo[]
constructors, Object[] arguments)
at Microsoft.PowerShell.Commands.NewObjectCommand.CallConstructor(Type type, ConstructorInfo[]
constructors, Object[] args)
Exception : System.Management.Automation.MethodException
InvocationInfo : {New-Object}
Line : $actionGroupObject1 = New-Object
Microsoft.Azure.Management.Monitor.Management.Models.ActivityLogAlertActionGroup $actionGroup.Id
Position : At line:1 char:23
+ ... upObject1 = New-Object Microsoft.Azure.Management.Monitor.Management. ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 63
HistoryId: 61
Message : Cannot find an overload for "ActivityLogAlertActionGroup" and the argument count: "1".
StackTrace : at System.Management.Automation.Adapter.GetBestMethodAndArguments(String methodName,
MethodInformation[] methods, PSMethodInvocationConstraints invocationConstraints, Object[] arguments,
Object[]& newArguments)
at System.Management.Automation.DotNetAdapter.ConstructorInvokeDotNet(Type type, ConstructorInfo[]
constructors, Object[] arguments)
at Microsoft.PowerShell.Commands.NewObjectCommand.CallConstructor(Type type, ConstructorInfo[]
constructors, Object[] args)
Exception : System.Management.Automation.MethodException
InvocationInfo : {New-Object}
Line : $actionGroupObject1 = New-Object
Microsoft.Azure.Management.Monitor.Management.Models.ActivityLogAlertActionGroup $actionGroup.Id
Position : At line:1 char:23
+ ... upObject1 = New-Object Microsoft.Azure.Management.Monitor.Management. ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 61
HistoryId: 57
Message : Cannot find an overload for "ActivityLogAlertActionGroup" and the argument count: "1".
StackTrace : at System.Management.Automation.Adapter.GetBestMethodAndArguments(String methodName,
MethodInformation[] methods, PSMethodInvocationConstraints invocationConstraints, Object[] arguments,
Object[]& newArguments)
at System.Management.Automation.DotNetAdapter.ConstructorInvokeDotNet(Type type, ConstructorInfo[]
constructors, Object[] arguments)
at Microsoft.PowerShell.Commands.NewObjectCommand.CallConstructor(Type type, ConstructorInfo[]
constructors, Object[] args)
Exception : System.Management.Automation.MethodException
InvocationInfo : {New-Object}
Line : New-Object Microsoft.Azure.Management.Monitor.Management.Models.ActivityLogAlertActionGroup
$actionGroup.Id
Position : At line:1 char:1
+ New-Object Microsoft.Azure.Management.Monitor.Management.Models.Activ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 57
HistoryId: 56
Message : Cannot find an overload for "ActivityLogAlertActionGroup" and the argument count: "1".
StackTrace : at System.Management.Automation.Adapter.GetBestMethodAndArguments(String methodName,
MethodInformation[] methods, PSMethodInvocationConstraints invocationConstraints, Object[] arguments,
Object[]& newArguments)
at System.Management.Automation.DotNetAdapter.ConstructorInvokeDotNet(Type type, ConstructorInfo[]
constructors, Object[] arguments)
at Microsoft.PowerShell.Commands.NewObjectCommand.CallConstructor(Type type, ConstructorInfo[]
constructors, Object[] args)
Exception : System.Management.Automation.MethodException
InvocationInfo : {New-Object}
Line : New-Object Microsoft.Azure.Management.Monitor.Management.Models.ActivityLogAlertActionGroup
$actionGroup
Position : At line:1 char:1
+ New-Object Microsoft.Azure.Management.Monitor.Management.Models.Activ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 56
HistoryId: 46
Message : Cannot find an overload for "ActivityLogAlertActionGroup" and the argument count: "1".
StackTrace : at System.Management.Automation.Adapter.GetBestMethodAndArguments(String methodName,
MethodInformation[] methods, PSMethodInvocationConstraints invocationConstraints, Object[] arguments,
Object[]& newArguments)
at System.Management.Automation.DotNetAdapter.ConstructorInvokeDotNet(Type type, ConstructorInfo[]
constructors, Object[] arguments)
at Microsoft.PowerShell.Commands.NewObjectCommand.CallConstructor(Type type, ConstructorInfo[]
constructors, Object[] args)
Exception : System.Management.Automation.MethodException
InvocationInfo : {New-Object}
Line : New-Object Microsoft.Azure.Management.Monitor.Management.Models.ActivityLogAlertActionGroup
$actionGroup.Id
Position : At line:1 char:1
+ New-Object Microsoft.Azure.Management.Monitor.Management.Models.Activ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 46
HistoryId: 45
Message : Cannot find an overload for "ActivityLogAlertActionGroup" and the argument count: "1".
StackTrace : at System.Management.Automation.Adapter.GetBestMethodAndArguments(String methodName,
MethodInformation[] methods, PSMethodInvocationConstraints invocationConstraints, Object[] arguments,
Object[]& newArguments)
at System.Management.Automation.DotNetAdapter.ConstructorInvokeDotNet(Type type, ConstructorInfo[]
constructors, Object[] arguments)
at Microsoft.PowerShell.Commands.NewObjectCommand.CallConstructor(Type type, ConstructorInfo[]
constructors, Object[] args)
Exception : System.Management.Automation.MethodException
InvocationInfo : {New-Object}
Line : New-Object Microsoft.Azure.Management.Monitor.Management.Models.ActivityLogAlertActionGroup
$actionGroup
Position : At line:1 char:1
+ New-Object Microsoft.Azure.Management.Monitor.Management.Models.Activ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 45
HistoryId: 43
Message : Exception type: ErrorResponseException, Message:
Microsoft.Azure.Management.Monitor.Models.ErrorResponseException: Operation returned an invalid
status code 'BadRequest'
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperations.<CreateOrUpdateWithHttpMessagesAs
ync>d__5.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 System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.<CreateOrUpdateAsync>d_
_1.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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.CreateOrUpdate(IActivit
yLogAlertsOperations operations, String resourceGroupName, String activityLogAlertName,
ActivityLogAlertResource activityLogAlert)
at Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand.ProcessReco
rdInternal()
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet(), Code: Null, Status
code:Null, Reason phrase: Null
StackTrace : at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Exception : System.Management.Automation.PSInvalidOperationException
InvocationInfo : {Set-AzActivityLogAlert}
Line : Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName
-Scope $scope -Action $actionGroupObject -Condition $condition1, $condition2 -Description
$alertDescription
Position : At line:1 char:1
+ Set-AzActivityLogAlert -Location $location -Name $alertName -Resource ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 43
Message : Operation returned an invalid status code 'BadRequest'
StackTrace : at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperations.<CreateOrUpdateWithHttpMessagesAs
ync>d__5.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 System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.<CreateOrUpdateAsync>d_
_1.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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.CreateOrUpdate(IActivit
yLogAlertsOperations operations, String resourceGroupName, String activityLogAlertName,
ActivityLogAlertResource activityLogAlert)
at Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand.ProcessReco
rdInternal()
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet()
Exception : Microsoft.Azure.Management.Monitor.Models.ErrorResponseException
InvocationInfo : {Set-AzActivityLogAlert}
Line : Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName
-Scope $scope -Action $actionGroupObject -Condition $condition1, $condition2 -Description
$alertDescription
Position : At line:1 char:1
+ Set-AzActivityLogAlert -Location $location -Name $alertName -Resource ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 43
HistoryId: 32
Message : Exception type: ErrorResponseException, Message:
Microsoft.Azure.Management.Monitor.Models.ErrorResponseException: Operation returned an invalid
status code 'BadRequest'
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperations.<CreateOrUpdateWithHttpMessagesAs
ync>d__5.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 System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.<CreateOrUpdateAsync>d_
_1.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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.CreateOrUpdate(IActivit
yLogAlertsOperations operations, String resourceGroupName, String activityLogAlertName,
ActivityLogAlertResource activityLogAlert)
at Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand.ProcessReco
rdInternal()
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet(), Code: Null, Status
code:Null, Reason phrase: Null
StackTrace : at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Exception : System.Management.Automation.PSInvalidOperationException
InvocationInfo : {Set-AzActivityLogAlert}
Line : Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName
-Scope $scope -Action (New-Object
Microsoft.Azure.Management.Monitor.Models.ActivityLogAlertActionGroup $actionGroup.Id) -Condition
$condition1, $condition2 -Description $alertDescription
Position : At line:1 char:1
+ Set-AzActivityLogAlert -Location $location -Name $alertName -Resource ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 32
Message : Operation returned an invalid status code 'BadRequest'
StackTrace : at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperations.<CreateOrUpdateWithHttpMessagesAs
ync>d__5.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 System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.<CreateOrUpdateAsync>d_
_1.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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.CreateOrUpdate(IActivit
yLogAlertsOperations operations, String resourceGroupName, String activityLogAlertName,
ActivityLogAlertResource activityLogAlert)
at Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand.ProcessReco
rdInternal()
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet()
Exception : Microsoft.Azure.Management.Monitor.Models.ErrorResponseException
InvocationInfo : {Set-AzActivityLogAlert}
Line : Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName
-Scope $scope -Action (New-Object
Microsoft.Azure.Management.Monitor.Models.ActivityLogAlertActionGroup $actionGroup.Id) -Condition
$condition1, $condition2 -Description $alertDescription
Position : At line:1 char:1
+ Set-AzActivityLogAlert -Location $location -Name $alertName -Resource ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 32
HistoryId: 31
Message : Exception type: ErrorResponseException, Message:
Microsoft.Azure.Management.Monitor.Models.ErrorResponseException: Operation returned an invalid
status code 'BadRequest'
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperations.<CreateOrUpdateWithHttpMessagesAs
ync>d__5.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 System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.<CreateOrUpdateAsync>d_
_1.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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.CreateOrUpdate(IActivit
yLogAlertsOperations operations, String resourceGroupName, String activityLogAlertName,
ActivityLogAlertResource activityLogAlert)
at Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand.ProcessReco
rdInternal()
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet(), Code: Null, Status
code:Null, Reason phrase: Null
StackTrace : at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Exception : System.Management.Automation.PSInvalidOperationException
InvocationInfo : {Set-AzActivityLogAlert}
Line : Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName
-Scope $scope -Action $actionGroupObject -Condition $condition1, $condition2 -Description
$alertDescription
Position : At line:1 char:1
+ Set-AzActivityLogAlert -Location $location -Name $alertName -Resource ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 31
Message : Operation returned an invalid status code 'BadRequest'
StackTrace : at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperations.<CreateOrUpdateWithHttpMessagesAs
ync>d__5.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 System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.<CreateOrUpdateAsync>d_
_1.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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.CreateOrUpdate(IActivit
yLogAlertsOperations operations, String resourceGroupName, String activityLogAlertName,
ActivityLogAlertResource activityLogAlert)
at Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand.ProcessReco
rdInternal()
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet()
Exception : Microsoft.Azure.Management.Monitor.Models.ErrorResponseException
InvocationInfo : {Set-AzActivityLogAlert}
Line : Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName
-Scope $scope -Action $actionGroupObject -Condition $condition1, $condition2 -Description
$alertDescription
Position : At line:1 char:1
+ Set-AzActivityLogAlert -Location $location -Name $alertName -Resource ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 31
HistoryId: 20
Message : Cannot bind parameter 'Action'. Cannot convert the "fakeactiongroup" value of type "System.String" to
type "Microsoft.Azure.Management.Monitor.Management.Models.ActivityLogAlertActionGroup".
StackTrace : at System.Management.Automation.ParameterBinderBase.CoerceTypeAsNeeded(CommandParameterInternal
argument, String parameterName, Type toType, ParameterCollectionTypeInformation collectionTypeInfo,
Object currentValue)
at System.Management.Automation.ParameterBinderBase.EncodeCollection(CommandParameterInternal
argument, String parameterName, ParameterCollectionTypeInformation collectionTypeInformation, Type
toType, Object currentValue, Boolean coerceElementTypeIfNeeded, Boolean& coercionRequired)
at System.Management.Automation.ParameterBinderBase.CoerceTypeAsNeeded(CommandParameterInternal
argument, String parameterName, Type toType, ParameterCollectionTypeInformation collectionTypeInfo,
Object currentValue)
at System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal
parameter, CompiledCommandParameter parameterMetadata, ParameterBindingFlags flags)
at
System.Management.Automation.CmdletParameterBinderController.BindParameter(CommandParameterInternal
argument, MergedCompiledCommandParameter parameter, ParameterBindingFlags flags)
at System.Management.Automation.CmdletParameterBinderController.BindParameter(UInt32
parameterSets, CommandParameterInternal argument, MergedCompiledCommandParameter parameter,
ParameterBindingFlags flags)
at System.Management.Automation.CmdletParameterBinderController.BindParameters(UInt32
parameterSets, Collection`1 arguments)
at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidati
on(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-AzActivityLogAlert}
Line : Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName
-Scope $scope -Action "fakeactiongroup" -Condition $condition1, $condition2 -Description
$alertDescription
Position : At line:1 char:121
+ ... me $resourceGroupName -Scope $scope -Action "fakeactiongroup" -Condit ...
+ ~~~~~~~~~~~~~~~~~
HistoryId : 20
Message : Cannot convert the "fakeactiongroup" value of type "System.String" to type
"Microsoft.Azure.Management.Monitor.Management.Models.ActivityLogAlertActionGroup".
StackTrace : at System.Management.Automation.LanguagePrimitives.ThrowInvalidCastException(Object
valueToConvert, Type resultType)
at System.Management.Automation.LanguagePrimitives.ConvertNoConversion(Object valueToConvert, Type
resultType, Boolean recurse, PSObject originalValueToConvert, IFormatProvider formatProvider,
TypeTable backupTable)
at System.Management.Automation.LanguagePrimitives.ConversionData`1.Invoke(Object valueToConvert,
Type resultType, Boolean recurse, PSObject originalValueToConvert, IFormatProvider formatProvider,
TypeTable backupTable)
at System.Management.Automation.LanguagePrimitives.ConvertTo(Object valueToConvert, Type
resultType, Boolean recursion, IFormatProvider formatProvider, TypeTable backupTypeTable)
at System.Management.Automation.ParameterBinderBase.CoerceTypeAsNeeded(CommandParameterInternal
argument, String parameterName, Type toType, ParameterCollectionTypeInformation collectionTypeInfo,
Object currentValue)
Exception : System.Management.Automation.PSInvalidCastException
InvocationInfo : {Set-AzActivityLogAlert}
Line : Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName
-Scope $scope -Action "fakeactiongroup" -Condition $condition1, $condition2 -Description
$alertDescription
Position : At line:1 char:121
+ ... me $resourceGroupName -Scope $scope -Action "fakeactiongroup" -Condit ...
+ ~~~~~~~~~~~~~~~~~
HistoryId : 20
HistoryId: 19
Message : Exception type: ErrorResponseException, Message:
Microsoft.Azure.Management.Monitor.Models.ErrorResponseException: Operation returned an invalid
status code 'BadRequest'
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperations.<CreateOrUpdateWithHttpMessagesAs
ync>d__5.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 System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.<CreateOrUpdateAsync>d_
_1.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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.CreateOrUpdate(IActivit
yLogAlertsOperations operations, String resourceGroupName, String activityLogAlertName,
ActivityLogAlertResource activityLogAlert)
at Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand.ProcessReco
rdInternal()
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet(), Code: Null, Status
code:Null, Reason phrase: Null
StackTrace : at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Exception : System.Management.Automation.PSInvalidOperationException
InvocationInfo : {Set-AzActivityLogAlert}
Line : Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName
-Scope $scope -Action $actionGroupObject -Condition $condition1, $condition2 -Description
$alertDescription
Position : At line:1 char:1
+ Set-AzActivityLogAlert -Location $location -Name $alertName -Resource ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 19
Message : Operation returned an invalid status code 'BadRequest'
StackTrace : at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperations.<CreateOrUpdateWithHttpMessagesAs
ync>d__5.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 System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.<CreateOrUpdateAsync>d_
_1.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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.CreateOrUpdate(IActivit
yLogAlertsOperations operations, String resourceGroupName, String activityLogAlertName,
ActivityLogAlertResource activityLogAlert)
at Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand.ProcessReco
rdInternal()
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet()
Exception : Microsoft.Azure.Management.Monitor.Models.ErrorResponseException
InvocationInfo : {Set-AzActivityLogAlert}
Line : Set-AzActivityLogAlert -Location $location -Name $alertName -ResourceGroupName $resourceGroupName
-Scope $scope -Action $actionGroupObject -Condition $condition1, $condition2 -Description
$alertDescription
Position : At line:1 char:1
+ Set-AzActivityLogAlert -Location $location -Name $alertName -Resource ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 19
HistoryId: 4
Message : Cannot find a variable with the name 'FunctionsNoV2Version'.
StackTrace :
Exception : System.Management.Automation.ItemNotFoundException
InvocationInfo : {Get-Variable}
Line : if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue))
Position : At C:\Program Files\WindowsPowerShell\Modules\Az.Functions\1.0.2\custom\HelperFunctions.ps1:97 char:15
+ ... if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 4
Message : Cannot find a variable with the name 'DefaultFunctionsVersion'.
StackTrace :
Exception : System.Management.Automation.ItemNotFoundException
InvocationInfo : {Get-Variable}
Line : if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue))
Position : At C:\Program Files\WindowsPowerShell\Modules\Az.Functions\1.0.2\custom\HelperFunctions.ps1:97 char:15
+ ... if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 4
Message : Cannot find a variable with the name 'RequiredStorageEndpoints'.
StackTrace :
Exception : System.Management.Automation.ItemNotFoundException
InvocationInfo : {Get-Variable}
Line : if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue))
Position : At C:\Program Files\WindowsPowerShell\Modules\Az.Functions\1.0.2\custom\HelperFunctions.ps1:97 char:15
+ ... if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 4
Message : Cannot find a variable with the name 'NodeDefaultVersion'.
StackTrace :
Exception : System.Management.Automation.ItemNotFoundException
InvocationInfo : {Get-Variable}
Line : if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue))
Position : At C:\Program Files\WindowsPowerShell\Modules\Az.Functions\1.0.2\custom\HelperFunctions.ps1:97 char:15
+ ... if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 4
Message : Cannot find a variable with the name 'RuntimeToDefaultOSType'.
StackTrace :
Exception : System.Management.Automation.ItemNotFoundException
InvocationInfo : {Get-Variable}
Line : if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue))
Position : At C:\Program Files\WindowsPowerShell\Modules\Az.Functions\1.0.2\custom\HelperFunctions.ps1:97 char:15
+ ... if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 4
Message : Cannot find a variable with the name 'RuntimeToDefaultVersion'.
StackTrace :
Exception : System.Management.Automation.ItemNotFoundException
InvocationInfo : {Get-Variable}
Line : if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue))
Position : At C:\Program Files\WindowsPowerShell\Modules\Az.Functions\1.0.2\custom\HelperFunctions.ps1:97 char:15
+ ... if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 4
Message : Cannot find a variable with the name 'AllowedStorageTypes'.
StackTrace :
Exception : System.Management.Automation.ItemNotFoundException
InvocationInfo : {Get-Variable}
Line : if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue))
Position : At C:\Program Files\WindowsPowerShell\Modules\Az.Functions\1.0.2\custom\HelperFunctions.ps1:97 char:15
+ ... if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 4
Message : Cannot find a variable with the name 'ReservedFunctionAppSettingNames'.
StackTrace :
Exception : System.Management.Automation.ItemNotFoundException
InvocationInfo : {Get-Variable}
Line : if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue))
Position : At C:\Program Files\WindowsPowerShell\Modules\Az.Functions\1.0.2\custom\HelperFunctions.ps1:97 char:15
+ ... if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 4
Message : Cannot find a variable with the name 'DotNetRuntimeVersionToDotNetLinuxFxVersion'.
StackTrace :
Exception : System.Management.Automation.ItemNotFoundException
InvocationInfo : {Get-Variable}
Line : if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue))
Position : At C:\Program Files\WindowsPowerShell\Modules\Az.Functions\1.0.2\custom\HelperFunctions.ps1:97 char:15
+ ... if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 4
Message : Cannot find a variable with the name 'SupportedFunctionsVersion'.
StackTrace :
Exception : System.Management.Automation.ItemNotFoundException
InvocationInfo : {Get-Variable}
Line : if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue))
Position : At C:\Program Files\WindowsPowerShell\Modules\Az.Functions\1.0.2\custom\HelperFunctions.ps1:97 char:15
+ ... if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 4
Message : Cannot find a variable with the name 'RuntimeToFormattedName'.
StackTrace :
Exception : System.Management.Automation.ItemNotFoundException
InvocationInfo : {Get-Variable}
Line : if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue))
Position : At C:\Program Files\WindowsPowerShell\Modules\Az.Functions\1.0.2\custom\HelperFunctions.ps1:97 char:15
+ ... if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 4
Message : Cannot find a variable with the name 'RuntimeVersions'.
StackTrace :
Exception : System.Management.Automation.ItemNotFoundException
InvocationInfo : {Get-Variable}
Line : if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue))
Position : At C:\Program Files\WindowsPowerShell\Modules\Az.Functions\1.0.2\custom\HelperFunctions.ps1:97 char:15
+ ... if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 4
HistoryId: -1
Message : Exception calling "CompleteInput" with "3" argument(s): "Index was out of range. Must be non-negative
and less than the size of the collection.
Parameter name: index"
StackTrace : at System.Management.Automation.ExceptionHandlingOps.ConvertToMethodInvocationException(Exception
exception, Type typeToThrow, String methodName, Int32 numArgs, MemberInfo memberInfo)
at CallSite.Target(Closure , CallSite , Type , String , Int32 , Hashtable )
at System.Management.Automation.Interpreter.DynamicInstruction`5.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame
frame)
Exception : System.Management.Automation.MethodInvocationException
InvocationInfo : {}
Line : return [System.Management.Automation.CommandCompletion]::CompleteInput(
Position : At line:38 char:16
+ ... return [System.Management.Automation.CommandCompletion]::Complet ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : -1
Message : Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
StackTrace : at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument,
ExceptionResource resource)
at System.SZArrayHelper.get_Item[T](Int32 index)
at System.Management.Automation.ExportVisitor.DoPsuedoParameterBinding(CommandAst commandAst,
String commandName)
at System.Management.Automation.ExportVisitor.VisitCommand(CommandAst commandAst)
at System.Management.Automation.Language.CommandAst.InternalVisit(AstVisitor visitor)
at System.Management.Automation.Language.PipelineAst.InternalVisit(AstVisitor visitor)
at System.Management.Automation.Language.StatementBlockAst.InternalVisit(AstVisitor visitor,
ReadOnlyCollection`1 traps, ReadOnlyCollection`1 statements, AstVisitAction action)
at System.Management.Automation.Language.NamedBlockAst.InternalVisit(AstVisitor visitor)
at System.Management.Automation.Language.ScriptBlockAst.InternalVisit(AstVisitor visitor)
at System.Management.Automation.Language.PseudoParameterBinder.PrepareFromAst(ExecutionContext
context, String& resolvedCommandName)
at
System.Management.Automation.Language.PseudoParameterBinder.PrepareCommandElements(ExecutionContext
context)
at System.Management.Automation.Language.PseudoParameterBinder.DoPseudoParameterBinding(CommandAst
command, Type pipeArgumentType, CommandParameterAst paramAstAtCursor, BindingType bindingType)
at System.Management.Automation.CompletionCompleters.CompleteCommandParameter(CompletionContext
context)
at System.Management.Automation.CompletionAnalysis.GetResultHelper(CompletionContext
completionContext, Int32& replacementIndex, Int32& replacementLength, Boolean isQuotedString)
at System.Management.Automation.CompletionAnalysis.GetResults(PowerShell powerShell, Int32&
replacementIndex, Int32& replacementLength)
at System.Management.Automation.CommandCompletion.CompleteInputImpl(Ast ast, Token[] tokens,
IScriptPosition positionOfCursor, Hashtable options)
at CallSite.Target(Closure , CallSite , Type , String , Int32 , Hashtable )
Exception : System.ArgumentOutOfRangeException
InvocationInfo : {}
Line : return [System.Management.Automation.CommandCompletion]::CompleteInput(
Position : At line:38 char:16
+ ... return [System.Management.Automation.CommandCompletion]::Complet ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : -1
Message : Exception calling "CompleteInput" with "3" argument(s): "Index was out of range. Must be non-negative
and less than the size of the collection.
Parameter name: index"
StackTrace : at System.Management.Automation.ExceptionHandlingOps.ConvertToMethodInvocationException(Exception
exception, Type typeToThrow, String methodName, Int32 numArgs, MemberInfo memberInfo)
at CallSite.Target(Closure , CallSite , Type , String , Int32 , Hashtable )
at System.Management.Automation.Interpreter.DynamicInstruction`5.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame
frame)
Exception : System.Management.Automation.MethodInvocationException
InvocationInfo : {}
Line : return [System.Management.Automation.CommandCompletion]::CompleteInput(
Position : At line:38 char:16
+ ... return [System.Management.Automation.CommandCompletion]::Complet ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : -1
Message : Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
StackTrace : at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument,
ExceptionResource resource)
at System.SZArrayHelper.get_Item[T](Int32 index)
at System.Management.Automation.ExportVisitor.DoPsuedoParameterBinding(CommandAst commandAst,
String commandName)
at System.Management.Automation.ExportVisitor.VisitCommand(CommandAst commandAst)
at System.Management.Automation.Language.CommandAst.InternalVisit(AstVisitor visitor)
at System.Management.Automation.Language.PipelineAst.InternalVisit(AstVisitor visitor)
at System.Management.Automation.Language.StatementBlockAst.InternalVisit(AstVisitor visitor,
ReadOnlyCollection`1 traps, ReadOnlyCollection`1 statements, AstVisitAction action)
at System.Management.Automation.Language.NamedBlockAst.InternalVisit(AstVisitor visitor)
at System.Management.Automation.Language.ScriptBlockAst.InternalVisit(AstVisitor visitor)
at System.Management.Automation.Language.PseudoParameterBinder.PrepareFromAst(ExecutionContext
context, String& resolvedCommandName)
at
System.Management.Automation.Language.PseudoParameterBinder.PrepareCommandElements(ExecutionContext
context)
at System.Management.Automation.Language.PseudoParameterBinder.DoPseudoParameterBinding(CommandAst
command, Type pipeArgumentType, CommandParameterAst paramAstAtCursor, BindingType bindingType)
at System.Management.Automation.CompletionCompleters.CompleteCommandParameter(CompletionContext
context)
at System.Management.Automation.CompletionAnalysis.GetResultHelper(CompletionContext
completionContext, Int32& replacementIndex, Int32& replacementLength, Boolean isQuotedString)
at System.Management.Automation.CompletionAnalysis.GetResults(PowerShell powerShell, Int32&
replacementIndex, Int32& replacementLength)
at System.Management.Automation.CommandCompletion.CompleteInputImpl(Ast ast, Token[] tokens,
IScriptPosition positionOfCursor, Hashtable options)
at CallSite.Target(Closure , CallSite , Type , String , Int32 , Hashtable )
Exception : System.ArgumentOutOfRangeException
InvocationInfo : {}
Line : return [System.Management.Automation.CommandCompletion]::CompleteInput(
Position : At line:38 char:16
+ ... return [System.Management.Automation.CommandCompletion]::Complet ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : -1
The Azure PowerShell team is listening, please let us know how we are doing: https://aka.ms/azpssurvey?Q_CHL=ERROR.
DEBUG: AzureQoSEvent: CommandName - Resolve-AzError; IsSuccess - True; Duration - 00:00:00.9928479;
DEBUG: Finish sending metric.
DEBUG: 12:23:15 PM - ResolveError end processing.
Am too facing the same Error.
Note: The below script ran successfully for similar storage account; but when I ran this in a loop for multiple storage accounts I am seeing the below error.
Script used.
$ActionGroupName = "TestAG" $ActionGroupResoruceGroupName = "ic3-int2-cu-opstools" $actionGroup = Get-AzActionGroup -Name $ActionGroupName -ResourceGroupName $ActionGroupResoruceGroupName $actionGroupId = New-AzActionGroup -ActionGroupId $actionGroup.Id;
$stAcc='i2cuic3staactorclstr003';
$Resource = Get-AzResource -Name $stAcc; $ResourceGroupName = $Resource.ResourceGroupName; $AlertName = "[CRITICAL][$stAcc Storage][Storage Account Key Regenerated]"; $Description = "$stAcc Storage Account Key got Regenerated"; $condition1 = New-AzActivityLogAlertCondition -Field 'category' -Equal 'Administrative' $condition2 = New-AzActivityLogAlertCondition -Field 'operationName' -Equal 'Microsoft.Storage/storageAccounts/regeneratekey/action' Set-AzActivityLogAlert -Location 'Global' -Name $AlertName -Description $Description -ResourceGroupName $ResourceGroupName -Scope $Resource.ResourceId -Condition $condition1,$condition2 -Action $actionGroupId
Error:
Set-AzActivityLogAlert : Exception type: ErrorResponseException, Message:
Microsoft.Azure.Management.Monitor.Models.ErrorResponseException: Operation returned an invalid status code 'BadRequest'
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperations.1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.<CreateOrUpdateAsync>d__1.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 System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.CreateOrUpdate(IActivityLogAlertsOperations
operations, String resourceGroupName, String activityLogAlertName, ActivityLogAlertResource activityLogAlert)
at Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand.ProcessRecordInternal()
at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet(), Code: Null, Status code:Null, Reason phrase: Null
At line:14 char:1
- Set-AzActivityLogAlert -Location 'Global' -Name $AlertName -Descripti ...
-
+ CategoryInfo : CloseError: (:) [Set-AzActivityLogAlert], PSInvalidOperationException + FullyQualifiedErrorId : Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand
@VeryEarly , please look into this question.
Having the same issue
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzMonEssential.
The request looks OK to me: HTTP Method: PUT
Absolute Uri: https://management.azure.com/subscriptions/c5930ba8-5b04-4664-9267-72bcef385673/resourceGroups/AzureSentinelRG-01/provi ders/microsoft.insights/activityLogAlerts/Test Storage Account Administrative Operations?api-version=2017-04-01
Headers: x-ms-client-request-id : ace472bd-5dde-4772-b9db-4434b52c45c2 accept-language : en-US
Body: { "properties": { "scopes": [ "/subscriptions/c5930ba8-5b04-4664-9267-72bcef385673/" ], "enabled": true, "condition": { "allOf": [ { "field": "Category", "equals": "Administrative" }, { "field": "Signal name", "equals": "All Administrative operations" } ] }, "actions": { "actionGroups": [ { "actionGroupId": "/subscriptions/c5930ba8-5b04-4664-9267-72bcef385673/resourceGroups/AzureSentinelRG-01/providers/microsoft.insights/act ionGroups/ActionGroup-01" } ] }, "description": "Test description" }, "location": "Global" }
@AzMonEssential please help take a look.
@asheniam @jagadisk can you please review. @nkiest, FYI
@shilpasharmaAM this is an Alerts team issue, who has now been flagged and Essentials removed.
We have a bug open for this:
Bug 5989659: [PS] Can't create ActivityLogAlert with an already created ActionGroup
Its currently scheduled for December.
Thanks!
Facing Similar Error, Running below Script:
$condition1 = New-AzActivityLogAlertCondition -Field 'category' -Equal 'Administrative' $condition2 = New-AzActivityLogAlertCondition -Field 'operationName' -Equal 'Microsoft.Network/networkSecurityGroups/securityRules/write'
$dict = New-Object "System.Collections.Generic.Dictionary``2[System.String,System.String]" $dict.Add('key1', 'value1')
$actiongroup = Get-AzActionGroup -Name "dev-ActionGroup" -ResourceGroup "RG" $actiongroup1 = New-AzActionGroup -ActionGroupId $actiongroup.Id -WebhookProperty $dict
Set-AzActivityLogAlert -Location 'Global' -Name 'createupdatensgrule-alert' -ResourceGroupName 'RG' -Scope '/subscriptions/000000-0000-0000-0000-000000000/' -Action $actiongroup.Id -Condition $condition1, $condition2
Error Message :
Set-AzActivityLogAlert: Exception type: ErrorResponseException, Message: Microsoft.Azure.Management.Monitor.Models.ErrorResponseException: Operation returned an invalid status code 'BadRequest' at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperations.CreateOrUpdateWithHttpMessagesAsync(String resourceGroupName, String activityLogAlertName, ActivityLogAlertResource activityLogAlert, Dictionary`2 customHeaders, CancellationToken cancellationToken) at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.CreateOrUpdateAsync(IActivityLogAlertsOperations operations, String resourceGroupName, String activityLogAlertName, ActivityLogAlertResource activityLogAlert, CancellationToken cancellationToken) at Microsoft.Azure.Management.Monitor.ActivityLogAlertsOperationsExtensions.CreateOrUpdate(IActivityLogAlertsOperations operations, String resourceGroupName, String activityLogAlertName, ActivityLogAlertResource activityLogAlert) at Microsoft.Azure.Commands.Insights.ActivityLogAlert.SetAzureRmActivityLogAlertCommand.ProcessRecordInternal() at Microsoft.Azure.Commands.Insights.MonitorCmdletBase.ExecuteCmdlet(), Code: Null, Status code:Null, Reason phrase: Null
@SN4Xx, could you please try a script similar to the below? The issue is most probably not related to the existing action group.
`$targetRGName = "MyRG"
$alertRuleName = "MyRuleName"
$resourceId = "/subscriptions/
$ag = Get-AzActionGroup -Name $agName1 -ResourceGroupName $targetRGName $actiongroupId = $ag.Id $agref = New-AzActionGroup -ActionGroupId $actiongroupId
$conditionString = 'category=Administrative|operationName=Microsoft.AnalysisServices/servers/suspend/action|Status=Started' $conditions = $conditionString.Split('|') $alertConditions = @() foreach($condition in $conditions) { $condField,$condVal = $condition.Split('=') $alertCondition = New-AzActivityLogAlertCondition -Field $condField -Equal $condVal $alertConditions += $alertCondition }
Set-AzActivityLogAlert -Location 'Global' -Name $alertruleName -ResourceGroupName $targetRGName -Scope $resourceId -Action $agref -Condition $alertConditions `
Thanks @liadtal Worked as Expected. :)