azure-powershell

Azure AD application adding a key via Powershell

旧街凉风 提交于 2019-12-04 13:42:01
问题 I'm trying to add a key in my Azure AD application using PowerShell. Unfortunately i was try first with Azure CLI, but after some research and some stackoverflow answers I figure out, that this cannot be done. I'm trying to automate the task from the link below via Powershell: http://blog.davidebbo.com/2014/12/azure-service-principal.html I'm also following these steps: https://blogs.technet.microsoft.com/kv/2015/06/02/azure-key-vault-step-by-step/ Is there any way to create/retrieve the

It's possible to create App Service Plans using Azure Powershell?

不羁岁月 提交于 2019-12-04 13:11:26
As the title say, I need to create App Service Plans programmatilly, The scenario: N azure websites will be created (dynamically, using azure powershell too) If someday the Premium App Service Plan can't handle the quantity of websites (even with autoscaling by cpu usage), another service plan must be created to hold new sites. It is possible? Or Am I going to the wrong way to accomplish this? Unless your design doesn't permit it, when you create a new Premium App Service Plan, create it in a new resource group, as that will give it a greater chance to have enough capacity to scale. Using

Unable to Access [Guest] metrics using Get-AzureRmMetric

两盒软妹~` 提交于 2019-12-04 06:12:52
问题 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

Deployment slot specific appsettin in ARM template?

情到浓时终转凉″ 提交于 2019-12-04 05:12:21
I'm trying to get into that Visual Studio Resource Group template. So far it's looking good, and I have added some appsettings for a web app, but my question is, how can I make them deployment slot specific? Is there something in the json for the template or the parameter file? Tom Sun - MSFT Please have a try to add the json code snipped in the ARM template. I have tested it. It works successfully. "resources": [ { "apiVersion": "2015-08-01", "name": "appsettings", "type": "config", "dependsOn": [ "[resourceId('Microsoft.Web/Sites/Slots', variables('webSiteName'), 'Staging')]" ], "properties"

Start-AzureStorageBlobCopy vs AzCopy: which one takes lesser time

二次信任 提交于 2019-12-04 04:12:52
问题 I need to move vhds from one subscription to other. I would like to know which one is better option for the same: Start-AzureStorageBlobCopy or AzCopy ? Which one takes lesser time ? 回答1: Both of them would take the same time as all they do is initiate Async Server-Side Blob Copy . They just tell the service to start copying blob from source to destination. The actual copy operation is performed by Azure Blob Storage Service. The time it would take to copy the blob would depend on a number of

Login-AzureRmAccount from VS Code terminal

泄露秘密 提交于 2019-12-04 02:28:02
When I try to login to Azure RM from VS Code terminal it just hangs. No prompt with login / password is shown. Is there any way to get logged in from that terminal? Otherwise running / debugging Azure PS scripts becomes more complicated than it should be :) The login window pops-up in the background... if you minimize all your windows you'll eventually find it. You need to wait for a moment, then you could see the login page. According to your description, I suggest you could select Non-interactive login. You could create a service principal that can access resource. Please refer to this link:

Create an Azure VM with an unmanaged disk

廉价感情. 提交于 2019-12-04 01:48:54
问题 I'm trying to create an Azure VM with an unmanaged disk via PowerShell since managed disks aren't supported in Azure Government yet. None of the documentation I could find for PowerShell VM creation references managed or unmanaged disks and the default seems to be managed disks. My VM creation fails with the following error: New-AzureRmVM : Managed Disks are not supported in this region. ErrorCode: BadRequest Here's the script I'm using: $location = "USGovTexas" New-AzureRmResourceGroup -Name

Is there an API to list all Azure Regions?

耗尽温柔 提交于 2019-12-04 01:39:32
I would like to list all Azure locations via some API (I need to generate some config files for every region, and use the exact naming that Azure does to avoid typos). I found this question , but it only lists regions a particular subscription is authorized to use. I want to list all regions that exist whether my subscription has access or not. Get-AzureRMLocation will give you the list of locations for your account/tenant/subscription that you run it against. az account list-locations -o table will give you a table like: DisplayName Latitude Longitude Name ------------------- ---------- -----

Azure ARM Template Unit Test

扶醉桌前 提交于 2019-12-03 20:05:15
问题 How to test Azure ARM Templates and validate them whether these are written correctly or not from local VM. I have tried it from Power Shell but it just validate only. I want to Unit Test the ARM templates 回答1: You can do unit test the ARM Templates with PESTER . If you are unfamiliar with pester, you can refer to this document. Example ARM Template The example template being tested allows for the selection of whether managed or un-managed disk are used for the VM. The template can be found

Azure AD application adding a key via Powershell

本秂侑毒 提交于 2019-12-03 08:37:51
I'm trying to add a key in my Azure AD application using PowerShell. Unfortunately i was try first with Azure CLI, but after some research and some stackoverflow answers I figure out, that this cannot be done. I'm trying to automate the task from the link below via Powershell: http://blog.davidebbo.com/2014/12/azure-service-principal.html I'm also following these steps: https://blogs.technet.microsoft.com/kv/2015/06/02/azure-key-vault-step-by-step/ Is there any way to create/retrieve the following things in Powershell: VaultUrl, AuthClientId, AuthClientSecret. This can be done using either the