Windows Azure App Service (Now an umbrella term for Azure Web App, Azure Api App, etc.) has a handy capability whereby developers can store key-value string pairs in Azure as part of the configuration information associated with a website. At runtime, Windows Azure Web Sites automatically retrieves these values for you and makes them available to code running in your website. Since the key-value pairs are stored behind the scenes in the Windows Azure Web Sites configuration store, the key-value pairs don’t need to be stored in the file content of your web application. From a security perspective that is a nice side benefit since sensitive information such as Sql connection strings with passwords never show up as cleartext in a config file. However, sometimes, this can be a little too much for the Azure Admins to configure each setting over there. In this blog post, we’ll learn how to apply application settings using PowerShell. Read More »
In one of the previous posts, we discussed how to create and manage Azure Storage accounts using PowerShell. However, we were using storage account key when trying to upload / delete / download files from azure blob storage. In case, you need to delegate access to a third person, this seems like a too much of access since that person will have access to whole storage account. In this post, we will discuss how to use SAS aka Shared Access Signature to delegate access in controlled way.
Concept of Shared Access Signature
A shared access signature is a way to delegate access to resources in a storage account, without sharing the storage account keys.Read More »
Microsoft Azure Storage is a cloud offering from Microsoft that provides highly scalable, available, durable storage. Its a part of Microsoft Azure offerings. Azure Storage consists of three data services: Blob storage, File storage, and Queue storage. Blob storage supports both standard and premium storage, with premium storage using only SSDs for the fastest performance possible.
Now as is often the case with the cloud services, it comes at a cost. So you should be very careful in using only the space you need and not paying for extra storage consumption that you should not need to. Along with that, you should be able to automate it. In this blog post, we’ll learn how to create an Azure Storage account, uploads some files to it in the blob storage and then delete them all using PowerShell. Read More »
Outgoing IP address for Azure App service are different than the incoming IP address. To clarify the difference, the incoming IP address (as the name would indicate) identify the IP address using which data could be sent to App Service. This is what you would see when you would typically do DNS resolution for the App Service. Outgoing IP address identify IP address which would be used when sending data from Azure App service to the outside world. You may need this info because you may need to protect your environment from threats or white-list certain requests.
If you have recently installed Azure PowerShell module on one of the machines and then trying to login using Select-AzureRMProfile, you are likely to receive below error:
Save-AzureRMProfile : The term ‘Save-AzureRMProfile’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try againAt line:3 char:2+ Save-AzureRMProfile -Path “C:\$SubscriptionName.json”+ ~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Save-AzureRMProfile:String) , CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
I checked the list of cmdlets and it was gone.Read More »
Recently, if you have been trying to deploy Azure Resource Group template using Visual Studio, you might see below error:
[ERROR] Add-AzureRmAccount : A parameter cannot be found that matches parameter name [ERROR] 'EnvironmentName'. [ERROR] At line:1 char:2379 [ERROR] + ... xmg' -AccountId 'firstname.lastname@example.org' -EnvironmentName 'AzureC ... [ERROR] + ~~~~~~~~~~~~~~~~ [ERROR] + CategoryInfo : InvalidArgument: (:) [Add-AzureRmAccount], Param [ERROR] eterBindingException [ERROR] + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.Azure.Commands. [ERROR] Profile.AddAzureRMAccountCommand [ERROR] [ERROR] Run Login-AzureRmAccount to login.
As discussed in one of the previous blog posts, we can use PowerShell to help create persistent logins. Now consider scenario, where you have access to multiple azure subscriptions. Off course, you can download and save AzureRM profile for each one of the them. However, there are two major issues:
- AzureRM profile downloaded is associated with a token by default and it expires in a few days.
- If you have too many subscriptions, it can be tiresome to first select subscription and then save the profile.
While doing azure automation from some time, I have found that I have to login each time I run a new PowerShell session. This is irritating while writing and executing scripts. You can do this manually by configuring the management certificate and subscription details with the Set-AzureSubscription and Select-AzureSubscription cmdlets or automatically by downloading the PublishSettings file from Windows Azure and importing it. In this blog post, we’ll see how to automate the login process for Microsoft Azure so that our script can run without any manual intervention. Read More »