Remember the days when you spend hours if not days just to get a lab environment in place and any time you wanted to use the environment again, you spend another couple of hours to get It updated. About 3 years ago I started to make more use of Azure based compute to run my virtual machines, that I use for technology learning and research activities. Initially created the virtual machines through the portal, but Read More …
When adding solutions to your OMS workspace you might get prompted to specify an Azure Automation account which then results in a link being created between the OMS workspace and the Azure Automation account. Now let’s assume you don’t need a specific OMS solution but you still want to create a link to an Automation account. While there is an “unlink workspace” option in the Azure portal, there is no “link workspace option” . Also Read More …
I believe that the Microsoft Operations Management Suite is yet another example of how cool Cloud based solutions can be. Instead of first having to spin up an entire backend infrastructure before you can actually start collecting data, with the Microsoft Operations Management Suite you can directly start focusing on the task of collecting and visualizing your data. This blog post is basically a summary of my notes and scripts that I created while exploring Read More …
One important topic to consider when deploying virtual machines in Azure is the size of the virtual machine as this affects the pricing, but beware that not only virtual machine sizing has a pricing impact other factors like storage and optional features like IP address options add to the costs as well. A good starting point to get an understanding of virtual machine costs is the Azure pricing calculator: https://azure.microsoft.com/en-in/pricing/calculator/ Be aware that when selecting Read More …
I have multiple Azure subscriptions linked to my account, so anytime I connect to Azure in PowerShell I have to make sure i am working in the right context. To simplify this I wrote a little helper function called Select-MyAzureRmSubscription. After entering the -SubscriptionName parameter the script enumerates alll the subscriptions I have access to and generates a dynamic parameter option.
The Select-MyAzureRmSubscription cmdlet provides an easy way to select an Azure Subscription
and sets authentication information for cmdlets that you run in the current session.
The context includes tenant subscription, and environment information.
A list of Subscriptions that the connected user has access to.
The cmdlet dynamically builds a list of accessible subscriptions
Select-MyAzureRmSubscription -SubscriptionName 'Visual Studio Professional with MSDN' -verbose
Sets the context to the Subscription 'Visual Studio Professional with MSDN'
VERBOSE: Selected SubscriptionName: Visual Studio Professional with MSDN
VERBOSE: Setting Azure Context to Visual Studio Professional with MSDN
Environment : AzureCloud
Account : firstname.lastname@example.org
TenantId : f2108ecc-dd4a-4b24-9f58-8b309a9a9a09
SubscriptionId : 46327b72-b63c-48dd-b7f9-8f9031a876f2
SubscriptionName : Visual Studio Professional with MSDN
Connec to Azure using Login-AzureRmAccount prior using this function
Version 1.0, 21.12.2016, Alex Verboon
$attributes = new-object System.Management.Automation.ParameterAttribute
$attributes.ParameterSetName = "__AllParameterSets"
$attributes.Mandatory = $false
$attributeCollection = new-object -Type System.Collections.ObjectModel.Collection[System.Attribute]
$_Values = ((Get-AzureRmSubscription | select-object SubscriptionName | Sort-object Name).SubscriptionName)
Write-Error "No Subscriptions found, check your connectivity to Azure"
$ValidateSet = new-object System.Management.Automation.ValidateSetAttribute($_Values)
$SubscriptionName = new-object -Type System.Management.Automation.RuntimeDefinedParameter("SubscriptionName", [string], $attributeCollection)
$paramDictionary = new-object -Type System.Management.Automation.RuntimeDefinedParameterDictionary
return $paramDictionary }
$SubscriptionName = $SubscriptionName.Value
Write-Verbose "Selected SubscriptionName: $SubscriptionName"
Write-verbose "Setting Azure Context to $SubscriptionName"
Select-AzureRmSubscription -SubscriptionName "$SubscriptionName"
Script location on GitHub: https://github.com/alexverboon/posh/blob/master/Azure/Utilities/select-MyAzureRmSubscription.ps1
Today when I opened my Azure portal I had a little surprise. The monthly MSDN subscription credit was much lower as I expected it to be. Did I eventually forget to turn off a virtual machine? Curious to find out where the cost had come from, I drilled into the subscription details and noticed that the higher costs had come from the Premium storage that I had used recently to deploy a virtual machine using Read More …
In the previous article (Part1) I walked through the steps of creating a Virtual Network using Azure Resource Manager and Visual Studio. In this article, we’ll look at using the Azure PowerShell cmdlets the some options for using parameters. For this walkthrough you need the following: An Azure Subscription that allows you to deploy resources Azure PowerShell 1.0 or great, download and installation details can be found here First login to Azure using the Read More …
A few weeks ago I wondered why in the Azure Portal some of the resources where flagged as “classic”. The article Understanding Resource Manager deployment and classic deployment provided the answer I was looking for and was the start of an interesting journey into Azure Resource Manager. If you haven’t heard of Azure Resource Manager yet, I highly recommend reading the Azure Resource Manager overview or watch the Introduction to Azure Resource Manager video available Read More …
To keep a long story short, today i started looking into Azure PowerShell and Azure Resource Manager and quickly found out that if I wanted to make use of ARM, i have to change some scripts I have used so far to deploy my Azure VMs. More on that in a later post. One cmdlet that I find paticularely annoying to use is Set-AzureRmVMSourceImage as it has a couple of mandatory parameters and to find Read More …
Last week Microsoft anounced GA for Azure AD Connect. To get a better understanding of how this all works, I installed it in my Cloud based lab that is hosted in Azure. I was supposed to demonstrate this to a colleague at work this week, but simply couldn’t find time for it, so here’s a short description on how to get started for him and for anyone else. First I recommend to read through the Read More …