azure-powershell

PatchResourceNotFound error while calling azure rest API

夙愿已清 提交于 2019-12-02 17:11:02
问题 when i am calling below log alerts azure rest api able to enable/disable only application insights) same api when calling alerts created on log analytics its throwing error "PatchResourceNotFound" https://management.azure.com/subscriptions/subid/resourcegroups/RGname/providers/microsoft.insights/scheduledQueryRules/alertname?api-version=2018-04-16 got below error { "error": { "code": "PatchResourceNotFound", "message": "The resource 'https://management.azure.com/subscriptions/4776c051-f4ef

PatchResourceNotFound error while calling azure rest API

你。 提交于 2019-12-02 11:44:44
when i am calling below log alerts azure rest api able to enable/disable only application insights) same api when calling alerts created on log analytics its throwing error "PatchResourceNotFound" https://management.azure.com/subscriptions/subid/resourcegroups/RGname/providers/microsoft.insights/scheduledQueryRules/alertname?api-version=2018-04-16 got below error { "error": { "code": "PatchResourceNotFound", "message": "The resource 'https://management.azure.com/subscriptions/4776c051-f4ef-4a30-8ce7-c9fb99ff0fc5/resourcegroups/DevOpsTestRG-A/providers/microsoft.insights/scheduledQueryRules

Unable to Access [Guest] metrics using Get-AzureRmMetric

♀尐吖头ヾ 提交于 2019-12-02 11:43:59
I have guest-level metrics enable for an Azure Virtual Machine and am trying to get the history for the [Guest]\Memory\Committed Bytes property using Get-AzureRMMetric . $endTime = Get-Date $startTime = $endTime.AddMinutes(-540) $timeGrain = '00:05:00' $metricName = '\Memory\Committed Bytes' $history=(Get-AzureRmMetric -ResourceId $resourceId ` -TimeGrain $timeGrain -StartTime $startTime ` -EndTime $endTime ` -MetricNames $metricName) $history.data | Format-table -wrap Average,Timestamp,Maxiumim,Minimum,Total I get the following error: This code works fine if I change the $metricname to any of

Alert creation for AppInsights fails with “Code”:“ResourceNotSupported”

一曲冷凌霜 提交于 2019-12-02 10:05:00
问题 I created an App Insights in Central US region using this script: New-AzureRmResource -ResourceName $appInsightsName -ResourceGroupName $defaultRgName -Tag @{ Name = "AppInsightsApp"; Value = $appInsightsName} -ResourceType "Microsoft.Insights/Components" -Location $defaultLocation -PropertyObject @{"Type"="ASP.NET"} -Force Now I'm trying to add an Alert to this App Insights instance using following script: $appInsights = Get-AzureRmResource -ResourceName $appInsightsName -ResourceGroupName

How to manage Azure AD App Roles for Azure AD Users

天大地大妈咪最大 提交于 2019-12-02 06:12:39
问题 1: Is anyone aware of a tool that can manage the assignment of Roles for Azure AD Users (the appRoles defined in the manifest) for Enterprise Applications in Azure AD? I am talking about how to Assign Roles (app specific) to existing Azure AD Users. It’s a very slow process using the Azure Portal for this. Of course, we could create this tool, but would be nice if such a tool already exists. What are large organizations with many Azure AD Enterprise Apps using today? 2: Is it really best

Alert creation for AppInsights fails with “Code”:“ResourceNotSupported”

醉酒当歌 提交于 2019-12-02 05:48:21
I created an App Insights in Central US region using this script: New-AzureRmResource -ResourceName $appInsightsName -ResourceGroupName $defaultRgName -Tag @{ Name = "AppInsightsApp"; Value = $appInsightsName} -ResourceType "Microsoft.Insights/Components" -Location $defaultLocation -PropertyObject @{"Type"="ASP.NET"} -Force Now I'm trying to add an Alert to this App Insights instance using following script: $appInsights = Get-AzureRmResource -ResourceName $appInsightsName -ResourceGroupName $defaultRgName -ResourceType "Microsoft.Insights/Components" -Verbose Add-AlertRule -Name "Exception

Fatal: Could not read password for 'https://OrganizationName@dev.azure.com': terminal prompts disabled

て烟熏妆下的殇ゞ 提交于 2019-12-02 05:20:25
I'm trying to merge the develop branch to the master branch when building with Azure Pipelines PowerShell task. But while executing the command git push , I'm getting this error: Fatal: Could not read password for ' https://OrganizationName@dev.azure.com ': terminal prompts disabled The code repository is "Azure Repos Git". git checkout -b master git config --global user.email "xxxxxxx@xxxx.xxx" git config --global user.name "xxxxx" git merge origin/develop git push origin master After referring some URLs, I've created the Personal Access Token, and modified the push command as git push https:

how to copy vhd to RM based subscription using powershell?

有些话、适合烂在心里 提交于 2019-12-02 04:44:23
问题 I am looking for Powershell script to copy vhd to subscription using Resource Manager deployment model. 回答1: vhd's are stored in Azure storage page blobs, and the storage API works independently of how an account is created (classic vs ARM). It's even independent of subscription. You just need your storage account's name and key. So you should just be able to copy via something like: $DestContext = New-AzureStorageContext -StorageAccountName "<name>" -StorageAccountKey "<key>" Start

Issue with KeyVault reference in ARM template

ぐ巨炮叔叔 提交于 2019-12-02 03:22:15
I am trying to create a master key vault, which will contain all certificates to authenticate as a certain user. I have 2 service principals => One for my app, One for deployment. The idea is that the deploy service principal gets access to the Key Vault and adds the certificate located there to the Store of the web applications. I have created the service principal and I have given him all permissions on the key vault. Also I have enabled access secrets in ARM templates for that key vault. Using powershell I am able to login as the Deploying SP and retrieving the secret (certificate). However

How to manage Azure AD App Roles for Azure AD Users

一曲冷凌霜 提交于 2019-12-02 03:18:27
1: Is anyone aware of a tool that can manage the assignment of Roles for Azure AD Users (the appRoles defined in the manifest) for Enterprise Applications in Azure AD? I am talking about how to Assign Roles (app specific) to existing Azure AD Users. It’s a very slow process using the Azure Portal for this. Of course, we could create this tool, but would be nice if such a tool already exists. What are large organizations with many Azure AD Enterprise Apps using today? 2: Is it really best practice to manually edit the manifest file in the portal? Would make more sense to have the file (the