Tagged: PowerShell

0

How to remove a HostPool from the Windows Virtual Desktop on Azure

After a few times deploying a Windows Virtual Desktop (WVD) infrastructure on Azure, I always found that sometimes you have the necessity to reset your environment, specially if this is your test environment. After a few tries on resetting the environment I develop the following process that allows me to reset in a few minutes. The process is simple. You just need to remove the virtual machines crested, the Application...

0

Infrastructure as a Code (IaC) Series #2 – The tools

On the previous and first post about the IaC Series, I wrote about the beginning on the IaC and did describe the tools. On this post I will detail all the tools that I have been using on my IaC projects. So, before you get started, there are a few tools that you want to make sure that you have to install prior to started working with IaC project. At...

0

Auto shutdown an Azure VM with PowerShell

At one of my costumers, after starting the process of Azure Governance, it come to my attention the following scenario, the majority of the Virtual Machines on the DevTest Labs were with no auto shutdown configuration. That can be setup easily, although we want to make sure that we wanted to introduce a mechanism that will enforce the shutdown of those virtual machine, even if that configuration is not setup....

0

How to migrate Azure Managed Disk to different subscription and region – Part II

On the previous post I describe what need to do to move Azure Managed Disks between subscriptions and after that between regions (see link HERE). Although I didn’t explore the steps mention to move between regions. Here are the step-by-steps of each stage, mention on the previous post, of how to move the Azure Managed Disk between Azure Regions: 1. Stop the virtual machine from migrating 1. Navigate to the...

0

How to migrate Azure Managed Disk to different subscription and region – Part I

On a recent project, I was asked to help move some virtual machines from a MSDN Subscription to a CSP subscription. With this move, we use the opportunity to consolidate on a different region as well. This last aspect makes the move a little more complex that was described on the Move resources to new resource group or subscription documentation. The migration of resources between different or within the same...

0

How to overwrite Tags on an Azure Resource

With the limitation of 15 Tags per resource, you will reach a point that you need to intervene and either remove some of the tags or reuse them. On my previous post (How to update specified tag from a resource) I showed a way to update a specific tag in a Azure Resource. Some time that will be enough, other time you need to overwrite what is implemented by a...

1

How to update specified tag from a resource

The usage of Tags on Azure resources is a very common and very useful for several reasons that I will not cover on this post. Although in some occasions, if you need to update a Tag from a resource, because either it’s not suitable anymore or you are reaching the limit of the number of Tags allowed by Azure. In this case the idea is reuse the Tag Shutdown, although...

0

How to get Tags for all the resources on the same Resource Group

When you heavily use Tags on your Azure Resources, is very easy to reach the limits of the Tags that Azure allow to use on each resource. On the other hand, to be consistent on the Tags applied on those resources is key to a good Tag implementation. The way that I like to do is to create an Azure Automation runbook, so when it runs you will have the...

0

How to access Azure Blob Storage container via a SAS token

Today I received an email, from a colleague ask me if it’s there is a way that you can download the entire blob container having a SAS token via PowerShell. After research, I found that it’s possible and I found 2 ways. One is through PowerShell and the other one is through AzCopy. Please find bellow the example of the code required to download the whole content of a blob...

0

Unresponsive Azure VM

Another day I was at one of my costumers, and a system engineer come to me asking me if I could help him troubleshoot an issue with an unresponsive Azure VM. I love this moments, specially when I can always learn new ways that users are using Azure. OK, lets move to the issue. Here is the list of issues that he reports to me: No RDP into VM VM...