Add Azure Monitor alerts using PowerShell

Hey Geeks! Today I’ve got for you PowerShell script to add Azure Monitor alerts. For people who tries to add Azure Monitor alerts using PowerShell AZ module probably now think why I prepare separate script for that. Basically in Az module is one command to do that so it’s quite easy. But what in case that requirement is to use AzureRM module? Now it’s a little bit complicated as there …

How to gather Azure access token using PowerShell

Hey! In today’s short article I want to show you how to gather Azure access token using PowerShell. Sometime it necessary to gather information from Azure once Azure PowerShell cmdlets are not enough for things we want to do or they are very limited. If we know the body syntax of the request we can send our request to Azure REST API and in most of the cases it should …

Check Azure Kubernetes expiration date of SPN

Hello again PowerShell maniac! Today got for you special script for check Azure Kubernetes expiration date of SPN. Did you ever worked with Azure Kubernetes Service or simply Kubernetes on different platform than Azure? If not let me explain you in few words what this service is used for. If you ever worked with Docker and containers you shouldn’t have a problem with understanding of this service, as basically AKS …

KeyVault expired

Get Azure Key Vault expired secrets

Hey Scripters! If you want to gather Azure Key Vault expired secrets by the script, today is your lucky day – I’ve prepared script for that 🙂 I was searched for some easy functionality which will easily notify me about Key Vault expired secrets. The only solution I found is Events functionality in Key Vault. However after few of my test (during writing this article this option is still in …

Get Azure virtual machines without NSG and ASG assigned

Hi Scripters! Today I’ve got for you awesome script which will generate report with information about Azure virtual machines without NSG and ASG assigned. For non-Azure related people – Network Security Groups and Application Secuirty Groups are Azure network security concepts, which allows to filter/block virtual machines network traffic and easily group them according to ports which should be used by specific type of application. Both NSG and ASG are …

loganalytics

Add Saved Queries to Log Analytics

Hey Folks, in today’s article want to show you how to add saved queries to log analytics in all subscriptions for the same tenant. Log Analytics is a service which allows you to store all logs from all your Azure services in one place. It allows in easy way to create query useful for us and gather all information which are needed for us. In one of the article my …

Get Azure resources details using PowerShell

Hello scripters, Today I want to share with you my script for gathering Azure resources details. Script is connecting to Azure subscription and take all resources base on resource groups names provided as input parameter. In the result table with Azure resources details such as Resource Group, Resource Name and Resource Type will be created and expoted to CSV file. You can define folder to which CSV file should be …

Remove function from Azure Function

In todays article I want to share with you script for remove function from Azure function. I was looking for some ready Powershell command for removing function, but AzureRM module is very limited in this area. The only thing which I found was information that most of operation on Azure function is available via API (however is still very limited). You can find Kudu documentation on https://github.com/projectkudu/kudu/wiki/REST-API. How script works? …

Add Azure Function key using PowerShell

In today’s article I want to show you how to add Azure Function key using PowerShell. Azure Function keys allows to authorize and authenticate at the level of the entire application or a single function using keys. In my script I’ve added only option to set same key for all of the functions in application. All input parameters are mandatory, so remember to fill them all. Script: If you will …

Check Azure VPN connection health

Hi Scripters! Today I want to show you how to check Azure VPN connection health using PowerShell. In my last post I showed you how to Setup Azure VPN. We will continue last topic about VPN but from monitoring perspective. It’s important to monitor Azure resources, specially if we connect Azure with On-premise environemnt. By default there is not standard monitoring solution which can help us to diagnose connectivty issue. …