Author: Daan Weda

Azure Resource Policy Monitor On Public IP

Because somebody asked me: “how do I monitor on resources with a public IP address in Azure?”, I started to look into Azure Resource Policies. After looking into different possibilities, it seems to me that Azure Resource Policy would be the best option to fit my requirements. Please note, that Azure Resource Policies is still in public preview! Because of its added value this is one of those public previews to consider in your Azure environment. To declare your custom policy all you have to do is just write a small piece of JSON code. Then tell Azure Resource Policy what to do when a resource with a public IP is created in your subscription. To be able to just monitor I chose “audit” mode, when it’s not allowed to create a public IP in your subscription the mode must be set to “deny”. If necessary, it’s possible to exclude this policy on a resource group. With some lines of PowerShell it’s quite easy to create and assign a policy. $definition = New-AzureRmPolicyDefinition -Name denyPublicIP -Description “Deny Public IP” -Policy “D:\Repository\ARM\ARM-Policys\NoPublicIP.json” $rg = Get-AzureRmResourceGroup -Name “$RGName” New-AzureRMPolicyAssignment -Name DenyPublicIP -Scope $rg.ResourceId -PolicyDefinition $definition   Select the Standard tier to get a better overview of the compliance status of your resources. With the Free tier, you can only enforce policies at the creation of new resources. While with the Standard tier, you can also enforce...

Read More

PSCONFEU2017

This year I attended the PowerShell Conference EU in Hannover and I decided to write a summary about this event. For this summary, I will only mention the key takeaways for me. Please feel free to add comments if you think something important is missing. The keynote from Jeffrey Snover was about the state of the union. This presentation was the perfect beginning for the PowerShell Conference Europe. The organization did well on picking the sessions because everything told during the keynote came back during the rest of the conference. The big question everybody wants to know, is PowerShell done? The answer is yes and no! PowerShell for Windows is done, PowerShell has achieved critical mass as a general purpose Windows scripting tool. But for the cloud it’s just the beginning, managing a cloud asks different things so for that there is PowerShell Core. The mission of PowerShell Core is to be the connector of the Hybrid Cloud. Powershell Core should enable the IT Pro to connect from any client to manage any server running on any cloud or to connect on-premise using any hypervisor with any storage and any networking. Now that PowerShell is done for Windows, I noticed that the PowerShell team starts to give more focus on the people working with the tools. The conference included more presentations about the DevOps way of working and thinking then PowerShell...

Read More

How to get Azure Automation runbook job id

What I really love about the Azure platform is that it provides me the possibility to create my own solutions. It’s so easy to just spin up a Dev environment with almost no investments. OMS is part of the Azure platform and you could be using it to extend your on-premise environment. In most cases in a hybrid scenario as an extension for your System Center environment. Big plus for OMS it’s quite easy to filter your machine on simple events with log analytics. It’s easy to create a simple dashboard or create alerting and one thing we Dutch people really love, it’s free! 😉 Because my main focus is on Automation and Azure Automation is part of the OMS, it started to get my interest. For today I just want to post a small tip, because when I was searching for this item I could not immediately find it. Sometimes you need the job ID of the Azure Automation runbook to: Restart failed runbooks with custom input; Control execution concurrency; Have more control over your runbooks. To get the job ID from your current runbook you could just put the following variable in your Azure Automation runbook: $PsPrivateMetaData.JobId.Guid   If you have any questions about this blog feel free to leave a comment below!   0...

Read More