azure-powershell

Import a database using AzureRM Powershell

…衆ロ難τιáo~ 提交于 2019-12-13 02:18:55
问题 There is a document named Import a BACPAC file to create a new Azure SQL database using PowerShell that covers how to import a bacpac file into SQL server under ASM. Is there a way to import a bacpac file into an Azure SQL Server using Azure Resource Management cmdlets. Following on from @juvchan answer I have been trying to get the following to work. $update = @{ "operationMode" = "Import" "storageKey"= "Key" "storageKeyType" = "Primary" "administratorLogin"= "adminlogin"

Get PublishingPassword for website with PowerShell for new Azure portal

痞子三分冷 提交于 2019-12-13 01:26:39
问题 I used to use Get-AzureWebsite -Name myportal to get PublishingPassword what I can use inside Visual Studio to publish the WebApp to the cloud. But now I was assigned with a new azure subscription that is not seen with the old azure command set (i.e. Get-AzureSubscription ). However this subscription is visible by Get-AzureRmSubscription (with "Rm" keyword). But Get-AzureRmWebApp doesn't contain PublishingPassword property. Is there any other way to get PublishingPassword with new command set

How to run PowerShell from Azure Data Factory

瘦欲@ 提交于 2019-12-12 18:47:59
问题 I have PowerShell script which splits a complex CSV file to a smaller CSV file for every 1000 records. Here is the code: $i=0;Get-Content C:\Users\dell\Desktop\Powershell\Input\bigsizeFile.csv -ReadCount 1000 | %{$i++; $_ | Out-File C:\Users\dell\Desktop\Powershell\Output\file$i.csv } Now I want to use this script in Azure PowerShell and I want to run this from Azure Data Factory. Can Someone please help with this. 回答1: you could execute your powershell command by using Custom activity in

cannot remove azure subscription

半城伤御伤魂 提交于 2019-12-12 18:12:14
问题 I have used this command Remove-AzureSubscription "XXX" to remove the subscription. When I use the Get-AzureSubscrition command again It display the subscription which I have deleted. How to resolve this issue and remove the subscription completely using power shell. 回答1: Get-AzureSubscription currently always goes out to the Azure API to return the list of subscriptions related to the account credentials for the session. The Remove-AzureSubscription does work to remove the subscription from

Set a custom domain for a storage account using Azure Powershell

余生颓废 提交于 2019-12-12 17:03:38
问题 Is it possible to set up a custom domain for a Azure Resource Manager (ARM) storage account using Azure Powershell? If so, how? I tried to set up a custom domain through the Azure Preview Web Portal but that functionality does not yet exist for the new resource manager storage accounts. Using this documentation, I am able to login and see the properties of my new RM storage account, but I am unsure how to update the CustomDomain property. I expected to find an example/documentation of how

Create an Azure Website with PowerShell and FTP

℡╲_俬逩灬. 提交于 2019-12-12 16:08:48
问题 I need to write a PowerShell script that automatically creates an Azure Website and deploy the content of a local file system. Seems that Azure PowerShell SDK doesn't provide a way to copy files to a website so we want to use FTP as a deploy method. To get the correct FTP endpoints and credentials the only way that I have found is to call an Azure Management Rest API: Get a Site’s Publish Profile. But this API as other Azure Management API requires a certificate. I have found the following

Azure Export SQL database example

痞子三分冷 提交于 2019-12-12 10:44:29
问题 Given Microsoft is deprecating the previous method of exporting a SQL DB they have put up a suggested example here: $subscriptionId = "YOUR AZURE SUBSCRIPTION ID" Login-AzureRmAccount Set-AzureRmContext -SubscriptionId $subscriptionId # Database to export $DatabaseName = "DATABASE-NAME" $ResourceGroupName = "RESOURCE-GROUP-NAME" $ServerName = "SERVER-NAME" $serverAdmin = "ADMIN-NAME" $serverPassword = "ADMIN-PASSWORD" $securePassword = ConvertTo-SecureString -String $serverPassword

Provision classic cloud service via ARM template

≯℡__Kan透↙ 提交于 2019-12-12 09:47:54
问题 In one of our project, we are trying to automate deployment of cloud components on Azure. For majority of components (basically all ARM components like Redis, Service bus, App Service etc.) we were able to achieve it using ARM templates and Powershell script. However, we are stuck at Cloud Service (classic) component. Cloud service component contains only WebRole in it and no VM needs to be provisioned. We can go via classic deployment model i.e. using ASM commands in power shell. But since,

Is there an API to list all Azure Regions?

陌路散爱 提交于 2019-12-12 08:24:46
问题 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. 回答1: Get-AzureRMLocation will give you the list of locations for your account/tenant/subscription that you run it against. 回答2: az account list

Azure power shell command to remove IP restrictions on App service

喜你入骨 提交于 2019-12-12 06:57:19
问题 I did my part of RnD and could not find Azure Powershell command remove IP restrictions on App service. Can someone help me out here plz. 回答1: Try the command below, it works fine on my side. $r = Get-AzureRmResource -ResourceGroupName "yourresourcegroup" -ResourceType Microsoft.Web/sites/config -ResourceName yourappservicename/web -ApiVersion 2016-08-01 $p = $r.Properties $p.ipSecurityRestrictions = @() Set-AzureRmResource -ResourceGroupName "yourresourcegroup" -ResourceType Microsoft.Web